FreeRADIUS 2.1.12 rlm_sqlcounter bug?

Alan DeKok aland at deployingradius.com
Sat Dec 17 14:57:02 CET 2011


ben beneke wrote:
> rlm_expr doesn't seem to have extensive documentation, nor was I able
> to find an example similar to what I want to achieve.

  It does math.  That's it.

> However, if I understand everything correctly, my solution would be
> something like the following:
> 
> rlm_expr is needed to calculate the difference between the substraction of
> "SELECT SUM(AcctOutputOctets+AcctInputOctets) FROM radacct where
> UserName='%{${key}}'" (which equals to 25687864955)
> and the Max-Octets value in radcheck (equaling 29687864955)
>
> IF $valueradacct < $valueradcheck: Acess Accept ELSE Access Reject
> 
> Does this reasoning make any sense?

  Yes.

  Except that Max-Octets (as an attribute) is bounded by 4G, too.  You'd
 be better off having rlm_expr query SQL directly, via %{sql:...}

  Alan DeKok.



More information about the Freeradius-Users mailing list