AcctSessionTime missing in Interims-Update / calculated by FR
Michael Markstaller
michael at markstaller.de
Mon Mar 26 20:00:03 CEST 2018
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 at 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.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20180326/13b3cc2b/attachment.sig>
More information about the Freeradius-Users
mailing list