The role of "deletestalesessions" parameter is to delete the record if checkrad script returns 0. Nevertheless, for it to work, you need to enable SNMP in your NAS, because checkrad script tries to connect through SNMP.
Checkrad script is responsible for avoiding stale sessions.
It works like this:
- user tries to log in.
- if there is a stale session in the database, run checkrad script
- checkrad script connects to the NAS (through snmp) and list active users.
- if checkrad sees the user, it returns 1. This tells freeradius to reject the authentication. In the log files, u will see "multiple logins"
- if checkrad does'nt see the user, it returns 0. This tells freeradius do accept the login
If for some reason, NAS does'nt send Acct-stop packet, you need to close the session in the database yourself. I wrote a script to do that. In fact, I based my script on coovachilli's script.