Decreasing connection time (Session-Timeout)

micobros micobros at gmail.com
Tue Oct 24 09:24:33 CEST 2006


In SQLCounter documentation they say "This module NEVER does any database
INSERTs or UPDATEs."

I can in fact grab the time elapsed and all kind of other information. But
my main problem is to update my database with the new time. 

I found that chillispot sends to freeRadius this message when a user
disconnects: 
Accounting-Request packet from host 127.0.0.1:1025, id=3, length=177
        Acct-Status-Type = Stop
        User-Name = "mico"
        Calling-Station-Id = "00-11-00-19-00-00"
        Called-Station-Id = "00-11-00-65-00-00"
        NAS-Port-Type = Wireless-802.11
        NAS-Port = 0
        NAS-Port-Id = "00000000"
        NAS-IP-Address = 127.0.0.1
        NAS-Identifier = "nas01"
        Framed-IP-Address = 192.168.189.2
        Acct-Session-Id = "453dda2800000000"
        Acct-Input-Octets = 7347
        Acct-Output-Octets = 10553
        Acct-Input-Gigawords = 0
        Acct-Output-Gigawords = 0
        Acct-Input-Packets = 38
        Acct-Output-Packets = 24
        Acct-Session-Time = 121
        Acct-Terminate-Cause = User-Request

freeRadius than calls accounting_stop_query located in sql.conf and UPDATES
the radacct table and its attributes with all these new values. 

What I'd like to do now is to execute a personalised sql query right after
this default accounting_stop_query so that I could save/modify all the info
I want. 

Or maybe is there another way to grab this Acct-Session-Time and User-Name
to update the correct user and modify his time left.

Any ideas? 


Cheers,
 
mico
 
"The only way to get rid of a temptation is to yield to it."
(Oscar Wilde)

> -----Original Message-----
> From: freeradius-users-bounces+micobros=gmail.com at lists.freeradius.org
> [mailto:freeradius-users-bounces+micobros=gmail.com at lists.freeradius.org]
> On Behalf Of Jonathan De Graeve
> Sent: dimanche 22 octobre 2006 17:20
> To: FreeRadius users mailing list
> Subject: RE: Decreasing connection time (Session-Timeout)
> 
> > Now, how could I subtract the elapsed time from the original Session-
> > Timeout time? So that the user will, at the next login, only have
> > 40minutes left.
> >
> 
> SQLcounter is the module you need.
> 
> J.
> 
> --
> Jonathan De Graeve
> IMELDA vzw
> Informatica Dienst
> Network System Engineer
> jonathan.de.graeve at imelda.be
> +32(0)15/50.52.98
> 
> 
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html




More information about the Freeradius-Users mailing list