Freeradius incorrect acctstoptime

Sachin Yadav sachin0235 at yahoo.com
Sat Dec 10 08:22:38 CET 2016


Hi,
We have a large deployment of about 600 NAS (mixed openwrt/mikrotik/others). I have noticed that for some records, incorrect acctstoptime was marked while user session was still going on and accounting was happening. So following is the flow -
1. Use login on hotspot, accounting starts2. After sometime (5-7 minutes), acctstoptime populates with a datetime value, while user is surfing3. user keep surfing and accounting keep happening.4. I have run radius in debug mode and captured log, NAS did not send any accounting stop packet.5. I have also observed around 26 records out of 110 current logged in users have same acctstoptime timestamp value and acctterminatecause value as either NULL or 0.
Looks like a query is making incorrect updates. I am using FR 2x an can't update to 3 right now. Have observed following query in logs, which might be an issue -
UPDATE radacct           SET              acctstoptime       =  '2016-12-08 12:13:26',              acctsessiontime    =  unix_timestamp('2016-12-08 12:13:26') -                                    unix_timestamp(acctstarttime),              acctterminatecause =  '',              acctstopdelay      =  0           WHERE acctstoptime IS NULL           AND nasipaddress      =  '192.168.182.1'           AND acctstarttime     <= '2016-12-08 12:13:26'

Or there may be some mis-configuration as our end. Kindly let me know.


More information about the Freeradius-Users mailing list