Reply-Message order and format

Sanity Computers sales at sanitycomputers.com.au
Sat Oct 19 03:49:10 CEST 2013


Hi all, FR 2.2 is working fine but I can't find detail on how to order the
counters and provide a logical reply message. The max-daily-session code
works and reply's perfectly and is how I would like a max-daily-bytes to
work.

If a user exceeds the bytes allowance the reply message is always the expiry
message. Is there documentation on the formatting and rules ? 

The debug output always shows the below, 

 

Sat Oct 19 01:13:41 2013 : Info: ++[noresetBytecounter] returns noop

Sat Oct 19 01:13:41 2013 : Info: ++? if (reject)

Sat Oct 19 01:13:41 2013 : Info: ? Evaluating (reject) -> FALSE

Sat Oct 19 01:13:41 2013 : Info: ++? if (reject) -> FALSE

 

 

In sites/available/default I have:

------------------------

authorize {

       sql{

           notfound = 1

           reject = 2

       }

       if(notfound){

        update reply {

            Reply-Message := "Username not found. Please check your details"

        }

        ok = reject

       }

       if(reject){

        update reply {

            Reply-Message := "Login Failed. Please check your Username and
Password"

        }

        ok = reject

       }      

 

noresetBytecounter{

        reject = 1

 

        }

          if(reject) {

               update reply {

               Reply-Message := "You have reached your data volume limit."

                             }

        ok

          } 

 

noresetcounter{

        reject = 1

    }

    if(reject){

            update reply {

                    Reply-Message := "You have reached your time limit"

            }

            ok = reject

    }

       

 

dailycounter 

 

expiration{

        userlock = 1

    }

    if(userlock){

            update reply {

                    Reply-Message := "Your account - %{User-Name} - has
expired, "

            }

            ok = reject

    }

}

------------

And this is /mysql/counter.conf

--------------

sqlcounter noresetBytecounter {

            counter-name = Total-Max-Octets

            check-name = ChilliSpot-Max-Total-Octets

            reply-name = ChilliSpot-Max-Total-Octets

            sqlmod-inst = sql

            key = User-Name

            reset = never

            query = "SELECT (SUM(AcctInputOctets)+SUM(AcctOutputOctets))
FROM radacct WHERE UserName='%{${key}}'"

      } 

------------------------------

Regards Jim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20131019/351b529b/attachment-0001.html>


More information about the Freeradius-Users mailing list