Re: Check traffic quota / rlm_sqlcounter

2010-04-11 Thread Mordor Networks
would u please show me the code u used? On Fri, Apr 9, 2010 at 4:27 PM, Alexander alexander_aust...@yahoo.comwrote: --- On Wed, 4/7/10, Alan DeKok al...@deployingradius.com wrote: See man unlang In the authorize section, do: if (%{sql: SELECT ...quota ...} = %{sql:SELECT

Re: Check traffic quota / rlm_sqlcounter

2010-04-09 Thread Alexander
--- On Wed, 4/7/10, Alan DeKok al...@deployingradius.com wrote:   See man unlang   In the authorize section, do:     if (%{sql: SELECT ...quota ...} = %{sql:SELECT ... usage ...}) {         reject     } Finally I got it to work. Thanks! Only drawback is that there must be traffic

Re: Check traffic quota / rlm_sqlcounter

2010-04-08 Thread Alexander
--- On Wed, 4/7/10, Alan DeKok al...@deployingradius.com wrote:   See man unlang Thanks for your hint, Alan.   In the authorize section, do:     if (%{sql: SELECT ...quota ...} = %{sql:SELECT ... usage ...}) {         reject     } I am using the following in the authorize section:

Check traffic quota / rlm_sqlcounter

2010-04-07 Thread Alexander
Dear all, please forgive me if this has been answered before but I have searched the list archive, FAQ and docs over and over again, without success so far. What I want to achieve is *traffic quota* enforcement per user at login time. E.g. user is permitted a quota of 100 MB and authentication

Re: Check traffic quota / rlm_sqlcounter

2010-04-07 Thread Alexander
--- On Wed, 4/7/10, Alan DeKok al...@deployingradius.com wrote: a) store traffic data in the DB when an accounting packet is received Accounting to DB is already working. b) check that on loging   You shouldn't need to use sqlcounter.  Just a plain SELECT will do it. Thank you for

Re: Check traffic quota / rlm_sqlcounter

2010-04-07 Thread Alan DeKok
Alexander wrote: What I would like to do is compare the returned value with another one which represents my traffic quota in bytes: See man unlang In the authorize section, do: if (%{sql: SELECT ...quota ...} = %{sql:SELECT ... usage ...}) { reject }