issue with dialup.conf

Fajar A. Nugraha list at fajar.net
Sun Feb 6 23:56:49 CET 2011


On Mon, Feb 7, 2011 at 1:08 AM, Tyller D <tyllerd at gmail.com> wrote:
> Hi
>
> I will try run the queries manually and see what happens.
>
> rlm_sqlcounter is cool, but this should work right?

The idea looks good.

However, since you're trying to reimplement what's already available,
you might have a hard time trying to get everything right. For
example, what happens when a user exceeds their quota? Your setup
would accept the user while sending a negative quota (which might or
might not work).

On my implmentation, I use rlm_sqlcounter, but I changed the way it
gets the numbers. I didn't like the way it does a sum() on radacct
every time a user logs in (one of the reasons were I want to delete
old entries from my radacct table), so I created an additional table
to record total usage, and update it using sql trigger. So instead of
having to examine thousands of rows when a user logs in, now the db
simply has to examine one row, plus update that row when a user logs
out. This way I can still make use of rlm_sqlcounter without having to
reinvent the whole logic behind it.

-- 
Fajar



More information about the Freeradius-Users mailing list