(RADIATOR) Modify SessionID
Joe Hughes
joeyconcrete at gmail.com
Sun Mar 4 15:16:35 CST 2007
Hi
I have a scenario where we had a number of expired sessions from a
given Nas. This Nas was since replaced but kept the same IP address
etc. The Nas is now accepting new sessions which are being stored in
said database. The problem is, now they are hitting the same
SessionID's as previous sessions stored from the previous Nas. I build
the various keys in the database based around NasID, NasPort and
SessionID - but the scenario remains where all 3 can match, and things
can get a little screwy.
What I want to do is modify the SessionID in the accounting records
before it hits our database, perhaps prefixing it an arbitary value.
e.g. If the SessionID was 00000A1 it would be become X_00000A1. I
guess my options are
a) See if there's an option on the Nas to manipulate the SessionID
b) Do some kind of hook/logic in the database to prefix the value
c) Manipulate the SessionID on the RADIUS box where it does the DB inserts
I use my own DB session management, so c) is perhaps the most
desirable option. I have looked at the different options and I think
the AcctColumnDef \formatted method may be the best.
Currently I have (For Nas X )
AcctColumnDef AcctSessionID,Acct-Session-Id
Can this be changed to
AcctColumnDef AcctSessionID,X_{Acct-Session-Id},formatted
Do I need to specify a variable for the value "X_" and can this be
taken from within the handler? Then if the NAS is replaced in the
future with the risk of duplicate sessionIDs, I can simply change the
value X_ to something else.
(Or - is there a better way entirely?)
Cheers
Joe
--
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