Freeradius incorrect acctstoptime

Sachin Yadav sachin0235 at
Sun Dec 11 16:28:09 CET 2016

Thank you everyone for the help.
I have updated accounting on/off query to check for called-station-id value while updating the records. For now everything seems to be working fine on NAS running openwrt. Have to test with different NAS. I hope mikrotik do send called-station-id value on accounting on/off packets.
Thanks again!! 

    On Sunday, December 11, 2016 8:06 PM, Alan DeKok <aland at> wrote:

 On Dec 10, 2016, at 11:38 PM, Sachin Yadav <sachin0235 at> wrote:
> Here are some more details, From the logs i found that 1 NAS reboots and it updates radacct. This query cause a mass update of acctstoptime value for almost 26 records out of 319 currently active, all updates happen for openwrt NAS only. Below is the log

  That's mostly what's supposed to happen.

  The issue is that the default configuration assumes your NASes have different IP addresses.  If they all have the same IP, then things will go wrong.

  You will need to check that each NAS is sending a unique value in Called-Station-Id.  You may have to split off the SSID from that field.

  Then, update the SQL accounting ON/OFF statements to key off of Called-Station-Id, instead of NAS-IP-Address.  Also ensure that the accounting ON/OFF packets contain a Called-Station-Id.  It might not be there...

  Or, you could use NAS-Identifier, if that is sent in every packet.  But it might not be.  And it would involve updating the SQL schema and queries to use NAS-Identifier.

  In short, you need SOME way to uniquely identity each NAS.  Most people do it by IP address.  When you gave each NAS the same IP address, you broke the assumptions in the default configuration.

  Alan DeKok.


More information about the Freeradius-Users mailing list