Session-Timeout conditionally appearing

Tuc at T-B-O-H.NET ml at t-b-o-h.net
Fri May 23 17:12:41 CEST 2008


Hi,

	Both tables empty. Debug is long, but I'm including the
run without any radacct records first, then the run with a radacct
record of 122 seconds used (They were only allocated 123). If you
want the whole log its at http://204.107.90.128/radacct.txt and
http://204.107.90.128/noradacct.txt respectively.

	With no radacct records :

setup# radtest hotspot ICANSEE localhost 1212 testing123
        User-Name = "hotspot"
        User-Password = "ICANSEE"
        NAS-IP-Address = 192.168.3.128
        NAS-Port = 1212
        Idle-Timeout = 900

(After ready to process)

rlm_sqlcounter: Entering module authorize code^M
sqlcounter_expand:  'SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='%{
User-Name}''^M
        expand: SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='%{User-
Name}' -> SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='hotspot'^M
sqlcounter_expand:  '%{sql:SELECT SUM(AcctSessionTime) FROM radacct WHERE UserNa
me='hotspot'}'^M
rlm_sql (sql): - sql_xlat^M
        expand: %{User-Name} -> hotspot^M
rlm_sql (sql): sql_set_user escaped user --> 'hotspot'^M
        expand: SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='hotspot
' -> SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='hotspot'^M
        expand: /usr/local/var/log/radius/sqltrace.sql -> /usr/local/var/log/rad
ius/sqltrace.sql^M
rlm_sql (sql): Reserving sql socket id: 3^M
rlm_sql_postgresql: query: SELECT SUM(AcctSessionTime) FROM radacct WHERE UserNa
me='hotspot'^M
rlm_sql_postgresql: Status: PGRES_TUPLES_OK^M
rlm_sql_postgresql: query affected rows = 1 , fields = 1^M
rlm_sql (sql): - sql_xlat finished^M
rlm_sql (sql): Released sql socket id: 3^M
        expand: %{sql:SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='h
otspot'} -> ^M
rlm_sqlcounter: No integer found in string ""^M
++[noresetcounter] returns noop^M



	With the radacct table entry

setup# radtest hotspot ICANSEE localhost 1212 testing123 
        User-Name = "hotspot"
        User-Password = "ICANSEE"
        NAS-IP-Address = 192.168.3.128
        NAS-Port = 1212
        Idle-Timeout = 900
        Session-Timeout = 1

rlm_sqlcounter: Entering module authorize code^M
sqlcounter_expand:  'SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='%{
User-Name}''^M
        expand: SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='%{User-
Name}' -> SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='hotspot'^M
sqlcounter_expand:  '%{sql:SELECT SUM(AcctSessionTime) FROM radacct WHERE UserNa
me='hotspot'}'^M
rlm_sql (sql): - sql_xlat^M
        expand: %{User-Name} -> hotspot^M
rlm_sql (sql): sql_set_user escaped user --> 'hotspot'^M
        expand: SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='hotspot
' -> SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='hotspot'^M
        expand: /usr/local/var/log/radius/sqltrace.sql -> /usr/local/var/log/rad
ius/sqltrace.sql^M
rlm_sql (sql): Reserving sql socket id: 3^M
rlm_sql_postgresql: query: SELECT SUM(AcctSessionTime) FROM radacct WHERE UserNa
me='hotspot'^M
rlm_sql_postgresql: Status: PGRES_TUPLES_OK^M
rlm_sql_postgresql: query affected rows = 1 , fields = 1^M
rlm_sql (sql): - sql_xlat finished^M
rlm_sql (sql): Released sql socket id: 3^M
        expand: %{sql:SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='h
otspot'} -> 122^M
rlm_sqlcounter: Check item is greater than query result^M
rlm_sqlcounter: Authorized user hotspot, check_item=123, counter=122^M
rlm_sqlcounter: Sent Reply-Item for user hotspot, Type=Session-Timeout, value=1^
M
++[noresetcounter] returns ok^M


			Tuc
> 
> Tuc,
> 
> Did you check you don't have anything for this user in
> radgroupcheck/radgroupreply?
> The debug log from freeradius might prove helpful.
> 
> 
> 
> On Fri, May 23, 2008 at 2:47 AM, Tuc at T-B-O-H.NET <ml at t-b-o-h.net> wrote:
> 
> > Hi,
> >
> >        I've run this on FR2.0.3 and 2.0.4, MySQL and Postgresql, and
> > I seem to see a pattern. I'm not sure if its the correct behaviour or
> > not.
> >
> >        Using counters, I add "Max-All-Session := 123" into my database
> > for a user. when I run radtest, I get :
> >
> > setup# radtest hotspot ICANSEE localhost 1212 testing123
> >        User-Name = "hotspot"
> >        User-Password = "ICANSEE"
> >        NAS-IP-Address = 192.168.3.128
> >        NAS-Port = 1212
> >        Idle-Timeout = 900
> >
> >        I would think I would see a :
> >
> >        Session-Timeout = 123
> >
> >        If, though, I add a record for a 122 second session into radacct and
> > run again, I see :
> >
> > setup# radtest hotspot ICANSEE localhost 1212 testing123
> >        User-Name = "hotspot"
> >        User-Password = "ICANSEE"
> >        NAS-IP-Address = 192.168.3.128
> >        NAS-Port = 1212
> >        Idle-Timeout = 900
> >        Session-Timeout = 1
> >
> >        Is Session-Timeout not showing due to misconfiguration on my
> > part (Fairly stock configuration), or because of some other reason?
> >
> >                Thanks, Tuc
> > -
> > List info/subscribe/unsubscribe? See
> > http://www.freeradius.org/list/users.html
> >
> 
> 
> Regards,
> Liran Tal.
> 
> ------=_Part_14620_947650.1211527419668
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
> 
> <br>Tuc,<br><br>Did you check you don't have anything for this user in radgroupcheck/radgroupreply?<br>The debug log from freeradius might prove helpful.<br><br><br><br><div class="gmail_quote">On Fri, May 23, 2008 at 2:47 AM, Tuc at <a href="http://T-B-O-H.NET">T-B-O-H.NET</a> <<a href="mailto:ml at t-b-o-h.net">ml at t-b-o-h.net</a>> wrote:<br>
> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
> <br>
>         I've run this on FR2.0.3 and 2.0.4, MySQL and Postgresql, and<br>
> I seem to see a pattern. I'm not sure if its the correct behaviour or<br>
> not.<br>
> <br>
>         Using counters, I add "Max-All-Session := 123" into my database<br>
> for a user. when I run radtest, I get :<br>
> <br>
> setup# radtest hotspot ICANSEE localhost 1212 testing123<br>
>         User-Name = "hotspot"<br>
>         User-Password = "ICANSEE"<br>
>         NAS-IP-Address = <a href="http://192.168.3.128" target="_blank">192.168.3.128</a><br>
>         NAS-Port = 1212<br>
>         Idle-Timeout = 900<br>
> <br>
>         I would think I would see a :<br>
> <br>
>         Session-Timeout = 123<br>
> <br>
>         If, though, I add a record for a 122 second session into radacct and<br>
> run again, I see :<br>
> <br>
> setup# radtest hotspot ICANSEE localhost 1212 testing123<br>
>         User-Name = "hotspot"<br>
>         User-Password = "ICANSEE"<br>
>         NAS-IP-Address = <a href="http://192.168.3.128" target="_blank">192.168.3.128</a><br>
>         NAS-Port = 1212<br>
>         Idle-Timeout = 900<br>
>         Session-Timeout = 1<br>
> <br>
>         Is Session-Timeout not showing due to misconfiguration on my<br>
> part (Fairly stock configuration), or because of some other reason?<br>
> <br>
>                 Thanks, Tuc<br>
> -<br>
> List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br>
> </blockquote></div><br><br>Regards,<br>Liran Tal.<br>
> 
> ------=_Part_14620_947650.1211527419668--
> 
> --===============1470191895==
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
> 
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
> --===============1470191895==--
> 




More information about the Freeradius-Users mailing list