(RADIATOR) Session Database Not Updating???

Hugh Irvine hugh at open.com.au
Fri May 11 19:04:19 CDT 2001


Hello Shon -

I don't think the queries that you have defined below will work correctly - 
why do you want to change the defaults? (see my  previous mail)

The way the session database works is as follows:

1. an access request arrives - do a delete based on the NAS/NAS-Port 
combination as by definition a session cannot already be present there
(this is to provide some self-healing in the face of lost stop packets)

2. check the session database for other entries for the same user - reject 
request if limit exceeded, accept otherwise

3. if the request above was accepted, on receipt of the accounting start 
request, add the corresponding record to the session database

4. when the session terminates and the accounting stop is received, delete 
the record from the session database

If you want me to investigate further, you will have to send me a copy of 
your configurartion file (no secrets) together with a trace 4 debug from 
Radiator showing what is going on.

BTW - the latest version of Radiator is 2.18.1.

regards

Hugh



On Saturday 12 May 2001 09:00, Shon Stephens wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I am using Radiator 2.17 and <SessionDatabase SQL>. I have setup and
> AddQuery, DeleteQuery, ClearNasQuery, and CountQuery. I noticed from
> logs that when a user connects, the first thing that happens is a
> delete from the sessions table. The next thing that happens is a
> select from the sessions table. However, there is never any insert
> into the sessions table. If there is no insert or everytime a user
> logs in (Access-Request Accepted) they are deleted from the sessions
> table, how can I enforce MaxSessions? I don't know what is wrong at
> all. Here is how I configure my SessionDatabase:
>
> <SessionDatabase SQL>
>
>   # Session DB Identifier. Use this to assign a name that can be
>   # referred to later.
>   Identifier DefaultSDB
>
>   # How we connect to the MySQL server.
>   DBSource dbi:mysql:radius:sqlserver
>   DBUsername user
>   DBAuth secret
>
>   # How we add entries to the session table.
>   AddQuery insert into sessions (username, time_stamp, session_id, \
>   nas_identifier, nas_port, framed_ip_addr) values ('%U', \
>   '%{GlobalVar:TimestampFormatted}', '%{Acct-Session-Id}', \
>   '%{NAS-Identifier}', '%{NAS-Port}', '%{Framed-IP-Address}')
>
>  # How we delete entries from the session table.
>  #DeleteQuery delete from sessions where username='%U' and \
>  #nas_identifier='%{NAS-Identifier}' and nas_port='%{NAS-Port}'
>  DeleteQuery delete from sessions where username='%U'
>
>   # Clear the sessions table whenever a NAS is rebooted.
>   ClearNasQuery delete from sessions where nas_identifier= \
>   '%{NAS-Identifier}'
>
>   # Count number of simultaneous sessions.
>   CountQuery select nas_identifier,nas_port,session_id from sessions
> \
>   where username='%U'
>
> </SessionDatabase>
>
> Thanks,
> Shon Stephens
> sstephens at corp.goamerica.net
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
>
> iQA/AwUBOvxvHUwGLkuD4lDdEQKAUQCglH5CB0+vIPX30Va2uD4D6FZNg90AniQ7
> p48z2lbLqnclCBYYlWEZJQxt
> =ISZR
> -----END PGP SIGNATURE-----
>
> ===
> 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.

-- 
Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
===
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