Check traffic quota / rlm_sqlcounter
Alexander
alexander_austria at yahoo.com
Thu Apr 8 13:29:37 CEST 2010
--- On Wed, 4/7/10, Alan DeKok <aland at 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:
if ("%{sql: SELECT Value from radcheck WHERE UserName='%{User-Name}' AND Attribute='Max-Octets';}" <= "%{sql: SELECT (SUM(Ac
ctInputOctets + AcctOutputOctets)) FROM radacct WHERE UserName='%{User-Name}';}") {
reject
}
Unfortunatly I get:
rlm_sql: Failed to create the pair: Invalid octet string "200000000" for attribute name "Max-Octets"
Any idea how to fix that?
Cheers,
Alexander
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: debug-radius-auth.txt
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20100408/894ed4b4/attachment.txt>
More information about the Freeradius-Users
mailing list