Abu
Rôney Eduardo
roneyeduardosantos at gmail.com
Thu Mar 13 20:20:34 CET 2014
2014-03-13 4:32 GMT-03:00 Nadir Aliyev <nadir at 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
More information about the Freeradius-Users
mailing list