(RADIATOR) alive timestamp updates SessionDatabase

David Booth dbooth at goulburn.net.au
Mon Apr 14 21:31:44 CDT 2003


Hi radiator,

I have a fixed number of ports. I am using a perl script to count RADONLINE
every minute.
If count >= number of ports I want to kick the longest session identified by
smallest TIMESTAMP
I have to do this by submitting to a remote script (not my NAS).

Its all working well but it looks to me as though 'alive' packets are
updating TIMESTAMP so I'm not booting the *longest* session.

I don't really need the alive records at all except to repopulate RADONLINE
if I clear it for some reason.
Perhaps I should drop 'alive's as in
http://www.open.com.au/archives/radiator/2000-09/msg00123.html

Or is there something preferable?

David Booth
Goulburn Internet
http://www.goulburn.net.au
0500522400

Foreground
LogStdout
LogDir /var/log/radius
DbDir .
Trace 0
LogFile /var/log/radius/logfile
BindAddress xxx.xxx.xxx.xxx
<Client DEFAULT>
    Secret xxxx
    DupInterval 2
</Client>
<Realm DEFAULT>
    AcctLogFileName /var/log/radius/detail
    PasswordLogFileName /var/log/radius/passwords
    AuthByPolicy ContinueWhileAccept
    <AuthBy FILE>
        Filename /var/log/radius/users
    </AuthBy>
    <AuthBy SQL>
        DBSource dbi:mysql:host=xxxx;database=xxxx
        DBUsername xxxx
        DBAuth xxxx
        AuthSelect SELECT password FROM RealNames WHERE username = '%n'
        EncryptedPassword
        DefaultSimultaneousUse 1
        AccountingTable %V%Y
        AccountingStopsOnly
        AcctColumnDef annex,NAS-IP-Address
        AcctColumnDef username,User-Name
        AcctColumnDef bytesin,Acct-Input-Octets,integer
        AcctColumnDef bytesout,Acct-Output-Octets,integer
        AcctColumnDef sessionlength,Acct-Session-Time,integer
        AcctColumnDef ipaddress,Framed-IP-Address
    </AuthBy>
</Realm>
<SessionDatabase SQL>
    DBSource dbi:mysql:host=xxxx;database=xxxx
    DBUsername xxxx
    DBAuth xxxx
    AddQuery insert into
RADONLINE(USERNAME,NASIDENTIFIER,ACCTSESSIONID,TIME_STAMP,FRAMEDIPADDRESS,SV
R_KEY,CALLING_STATION) values
('%u','%1',%3,%{Timestamp},'%{Framed-IP-Address}','%{Ascend-Session-Svr-Key}
','%{Calling-Station-Id}')
    DeleteQuery delete from RADONLINE where USERNAME='%0'
</SessionDatabase SQL>


===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list