Stale Sessions Freeradius 3.0

Alan DeKok aland at
Thu Sep 6 13:50:18 CEST 2018

On Sep 6, 2018, at 7:17 AM, Ryan Raamsumair via Freeradius-Users <freeradius-users at> wrote:
> Thanks for the swift response
> ​After doing some checks , something is definitely wrong with some of the accesspoints that were recently put in and outfitted with openwrt . The older ones are sending an idle timeout stop accounting session to the radius server to close the account.
> Problem is that the fix the for the wifi driver for these new accesspoints may be long in coming ,

  Then there isn't a lot you can do.

> my only next option is to adjust the radius server to possibly terminate the session that is already logged on (in radacct) when the same mac address or calling station id tries to authenticate again 

  That's one option.  That process isn't in the default configuration because it's unusual.  Many systems allow the user to log in multiple times.

> I tried including the following code in the queries.conf . but i haven't had any positive results or not sure if it would even work .

  Read the documentation to see how the server works.  The file you edited has lots of comments that describe what the queries are, and what they do.

  If you edit the file, read the debug output to see what the server is doing.

  In this case, the server runs the queries until it gets a successful result.  It *doesn't* run multiple successful queries.

  You could just put that SQL statement into a dynamic expansion:

	if ("%{sql:UPDATE acct_table SET ...}") {
		... an older session was removed ...

  The "if" block can just have "ok" inside of it.  It doesn't need to do anything else.

> Possibly because it has to go somewhere within one of the other modules ?

  No.  You can't take SQL configuration and put it into another module.

  Alan DeKok.

More information about the Freeradius-Users mailing list