Hi, now on FR 2.2.8 Ubuntu 16.04 LTS (do I really need 2.2.10?): I want a mainly stable and admin-friendly "stock-setup" which is Ubuntu 16.04 here right now.. And my needs are also IMHO not very sophisticated, just acct to SQL mitigating somehow what the ASA-developers obviously have missed while reading the RADIUS-RFC :) Anyway, there is also no AcctStartTime in Interim-Update packets, so Alans' suggestion fails --- Debug --- ++if (!Acct-Session-Time && Acct-Start-Time) { +++update request { expand: %l / 1000 -> 1522081439 / 1000 expand: %{expr:%l / 1000} - %{Acct-Start-Time} -> 1522081 - ERROR: Failed parsing value "1522081 - " for attribute Acct-Session-Time: Unknown value 1522081 - for attribute Acct-Session-Time +++} # update request = fail ++} # if (!Acct-Session-Time && Acct-Start-Time) = fail +} # group preacct = fail --- Debug --- Any other ideas besides saving the timestamp %l in another field and calculated by crontab-SQL? Michael Am 24.03.2018 um 13:23 schrieb Alan DeKok:
On Mar 23, 2018, at 3:17 PM, Michael Markstaller via Freeradius-Users <freeradius-users@lists.freeradius.org> wrote:
FR: 2.1.12 on Debian
Upgrade to 2.2.10. It's config compatible, and much better.
I have a probably easy and stupid problem:
The Cisco ASA (5525-X, 9.4.4) doesn't send AcctSessionTime in "Interim-Update" so I want FR to just calculate it to be able to purge stale sessions (by a sep. cronjob)
So... in preacct {...} section, do:
if (!Acct-Session-Time && Acct-Start-Time) { update request { Acct-Session-Time := "%{expr:%l - %{Acct-Start-Time}}" } }
That creates the Acct-Session-Time if it doesn't already exist.
Alan DeKok.