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. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html