problems with sqlcounter

Przemysław Backiel przemyslaw.backiel at backiel.com.pl
Wed Mar 1 17:21:23 CET 2006


Hello,

I have a problem with sqlcounter. I am using a 1.1.0 version of freeradius.
I have that problem: When I set a atribute Max-Daily-Session := 30
the user can connect after total time of 30 sec radius kicks him, but he 
can re connect, I don't know where is the source of the problem, please 
help me.


my sqlcounter.conf looks just like this:

sqlcounter noresetcounter {
                 counter-name = Max-All-Session-Time
                 check-name = Max-All-Session
                 sqlmod-inst = sql
                 key = User-Name
                 reset = never

                 query = "SELECT SUM(AcctSessionTime) FROM radacct WHERE 
UserName='%{%k}'"

         }


sqlcounter dailycounter {
                 driver = "rlm_sqlcounter"
                 counter-name = Daily-Session-Time
                 check-name = Max-Daily-Session
                 sqlmod-inst = sqlcca3
                 key = User-Name
                 reset = daily

                 query = "SELECT SUM(AcctSessionTime - GREATEST((%b - 
UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE UserName='%{%k}' 
AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"

         }

sqlcounter monthlycounter {
                 counter-name = Monthly-Session-Time
                 check-name = Max-Monthly-Session
                 sqlmod-inst = sqlcca3
                 key = User-Name
                 reset = monthly

                 query = "SELECT SUM(AcctSessionTime - GREATEST((%b - 
UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE UserName='%{%k}' 
AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"

         }

-- 
Z powazaniem
Przemyslaw Backiel




More information about the Freeradius-Users mailing list