(RADIATOR) SessionDatabase:DeleteQuery statement in Access-Request

DELORT Stephane Stephane.DELORT at murex.com
Mon Nov 7 11:18:54 CST 2005


Dear list,

my wireless NAS reauthenticates users after sometimes.
When it does so, there is no Accounting-Request Start or Alive sent after.

When Radiator receives the Access-Request is does the DeleteQuery and the user is deleted from my table OnlineUsers.
As there is not Accounting Alive or Start sent after, the user is not logged in the OnlineUsers table. From this point and until there is an Start or Alive, he could be considered as a "ghost user".

Reading the reference manual of Radiator, I saw that the DeleteQuery is done "when an Accounting-Request Stop message is received". 
Is it a feature to have it in Access-request as well ?

You will find my config and logs enclosed below.

Regards,
Stéphane




****** Config sample

<SessionDatabase SQL>
	Identifier TEST_SESSION_DB

	DBSource	dbi:mysql:mytestdatabase:192.168.0.2
	DBUsername  radius	
	AddQuery 			insert into ONLINEUSERS (LOGIN, NASIDENTIFIER, NASPORT, ACCTSESSIONID, TIME_STAMP, FRAMEDIPADDRESS, NASPORTTYPE, SERVICETYPE, CALLEDSTATIONID) values ('%u', '%1', %2, %3, %{Timestamp}, '%{Calling-Station-Id}', '%{NAS-Port-Type}', '%{Service-Type}', '%{Called-Station-Id}')
	DeleteQuery 	      delete from ONLINEUSERS where ACCTSESSIONID='%{Acct-Session-Id}' and FRAMEDIPADDRESS='%{Calling-Station-Id}'
	CountQuery 			select NASIDENTIFIER, NASPORT, ACCTSESSIONID, FRAMEDIPADDRESS from ONLINEUSERS where LOGIN='%u'
	CountNasSessionsQuery 	select ACCTSESSIONID from ONLINEUSERS where NASIDENTIFIER='%0'
	ClearNasQuery
	ClearNasSessionQuery	delete from ONLINEUSERS where NASIDENTIFIER='%0' \ and ACCTSESSIONID = '%1'

</SessionDatabase>


****** Logs 

Mon Nov  7 12:16:15 2005: DEBUG: Packet dump:
*** Received from 172.21.16.208 port 20004 ....
Code:       Access-Request
Identifier: 35
Authentic:  )<1><241><9>C:<143><14>*Y]/C<203>/<
Attributes:
	NAS-Port-Id = "2/1"
	Calling-Station-Id = "00-90-4B-1B-5C-15"
	Called-Station-Id = "00-0B-0E-13-17-40:MX_WIFI"
	Service-Type = Framed-User
	EAP-Message = <2><1><0><24><1>FR-MUREX-COM\testuser
	User-Name = "FR-MUREX-COM\testuser"
	NAS-Port-Type = Wireless-IEEE-802-11
	NAS-Identifier = "Trapeze"
	NAS-IP-Address = 172.21.16.208
	Message-Authenticator = <153><211><155>I<157><221><4>`f;<141><15><253><196><184><205>

Mon Nov  7 12:16:15 2005: DEBUG: Rewrote user name to testuser at FR-MUREX-COM
Mon Nov  7 12:16:15 2005: DEBUG: Handling request with Handler 'Called-Station-Id=/MX_WIFI/ '
Mon Nov  7 12:16:16 2005: DEBUG: TEST_SESSION_DB Deleting session for FR-MUREX-COM\testuser, 172.21.16.208, 
Mon Nov  7 12:16:16 2005: DEBUG: do query is: 'delete from ONLINEUSERS where ACCTSESSIONID='' and FRAMEDIPADDRESS='00-90-4B-1B-5C-15'': 
Mon Nov  7 12:16:16 2005: DEBUG: Query is: 'select NASIDENTIFIER, NASPORT, ACCTSESSIONID, FRAMEDIPADDRESS from ONLINEUSERS where LOGIN='FR-MUREX-COM\testuser'': 
Mon Nov  7 12:16:16 2005: DEBUG: Handling with Radius::AuthFILE: 
Mon Nov  7 12:16:16 2005: DEBUG: Handling with EAP: code 2, 1, 24
Mon Nov  7 12:16:16 2005: DEBUG: Response type 1
Mon Nov  7 12:16:16 2005: DEBUG: EAP result: 3, EAP PEAP Challenge
Mon Nov  7 12:16:16 2005: DEBUG: AuthBy FILE result: CHALLENGE, EAP PEAP Challenge
Mon Nov  7 12:16:16 2005: DEBUG: Access challenged for testuser at FR-MUREX-COM: EAP PEAP Challenge
Mon Nov  7 12:16:16 2005: DEBUG: Packet dump:

--
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