Help retrieving sqlcounter values
Mark D. Montgomery II
techiem2 at techiem2.net
Wed Mar 30 20:47:14 CEST 2011
We are working on re-setting up our hotspot (coovachilli/freeradius
accounting in sql/ldap authentication) better and are trying to setup
bandwidth limiting and such.
What we seem to be having problems with is how to pull the data out of
the sqlcounter module to compare the data used to the data limit.
Such as:
if ( amount_user_has_used >= limit_allowed)
{
do stuff to block them or whatever
}
We are trying to understand how the counter-name (Max-Usage-Allowed),
check-name (Check-Max-Usage), and reply-name (Reply-Max-Usage) in the
counter (UsageCounter) are accessed and evaluated to do the comparison.
When we put
if (<counter-name> >= blah)
in, the function appears to be called and run, but this does not give
us a valid comparison.
Freeradius debug shows that the counter sql query is running and
producing a numerical output, but obviously this is not the correct
way to call it to get the comparison we want.
We have tried such things as <counter-name>:<check-name> and such but
just get errors and the counter query never runs.
Any insight?
We have searched all over and have not been able to get this working yet.
Thanks.
Mark II
--
Mark D. Montgomery II
http://www.techiem2.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 4562 bytes
Desc: PGP Public Key
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20110330/bba4b8e8/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: PGP Digital Signature
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20110330/bba4b8e8/attachment.pgp>
More information about the Freeradius-Users
mailing list