The solution then is to fetch the Acct-Unique-Session-Id, and to use that.
You are talking about using unlang and fetching acct-unique-sessionid in accounting right also for zapping??
Two: I noticed some anomaly in simultaneous verify query in sql and when the attributes are selected to actually delete stale sessions, I am running 3.0.11.
which selects radacctid, acctsessionid, username, nasipaddress, nasportid, framedipaddress, callingstationid, framedprotocol. That is 8 attributes from the radacct table. And somehow my stale sessions were all getting acctsessiontime as 0
OK...
The code above makes use of 9 attributes last one being(row[8]) acctsessiontime which was not getting fetched in the query. For that reason it always picks the value as 0 for acctsessiontime which is not ideal(a guess).
I'll push a fix.
You can also calculate the "stop time" as the time when the ZAP packet was sent. i.e. if there's no time in the packet, use Event-Timestamp, or "now".
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/ list/users.html
-- BR, Anirudh Malhotra Mail: 8zero2.in@gmail.com Facebook: www.facebook.com/8zero2 Twitter: @8zero2_in Blog: blog.8zero2.in