13 Mar
2014
13 Mar
'14
3:20 p.m.
2014-03-13 4:32 GMT-03:00 Nadir Aliyev <nadir@azstarnet.az>:
Hello,
I use rlm_sql module and have problems with stale sessions.
In my case I want to close for user existing staled session in database if new accounting_start_query (insert query) occurs. How can i realize this?
I use this in the authorize session: authorize { ... # Clear Stale Sessions when same user x mac tries to reconnect: if(User-Name){ "%{sql:UPDATE radacct set acctstoptime=ADDDATE(acctstarttime,INTERVAL acctsessiontime SECOND), acctterminatecause='Clear-Stale-Session' WHERE username='%{User-Name}' AND callingstationid='%{Calling-Station-Id}' AND acctstoptime is NULL}" } ... } -- Roney Eduardo