Possible to calculate the Acct-Unique-Session-Id like FR2 did

Daniel Finger daniel.finger at ewetel.de
Fri Mar 15 13:26:04 CET 2019


Hi!

As stated in the Readme does freeradius 3 calculate the 
Acct-Unique-Session-ID a little different.

I tried to adapt the policy, but I am failing since the md5 calculated by 
fr2 is 16 chars while fr3 uses 32 chars.
Is it possible to get the old 16 char value via unlang?

Comparison:
Freeradius 3:

Fri Mar 15 12:55:40 2019 : Debug: (53) Received Accounting-Request Id 188 
from 127.0.0.1:48589 to 127.0.0.1:1823 length 164
Fri Mar 15 12:55:40 2019 : Debug: (53)   Acct-Session-Id = "000D532D"
Fri Mar 15 12:55:40 2019 : Debug: (53)   Framed-IP-Address = 10.1.1.253
Fri Mar 15 12:55:40 2019 : Debug: (53)   User-Name = "testuser"
Fri Mar 15 12:55:40 2019 : Debug: (53)   NAS-Port = 918
Fri Mar 15 12:55:40 2019 : Debug: (53)   NAS-IP-Address = 1.2.3.4
Fri Mar 15 12:55:40 2019 : Debug: (53)   NAS-Identifier = "cisco_vpn"
Fri Mar 15 12:55:40 2019 : Debug: (53) # Executing section preacct from file 
/radius/conf/sites-enabled/conf
Fri Mar 15 12:55:40 2019 : Debug: (53)   preacct {
Fri Mar 15 12:55:40 2019 : Debug: (53)     policy acct_unique {
Fri Mar 15 12:55:40 2019 : Debug: (53)       update request {
Fri Mar 15 12:55:40 2019 : Debug: (53)         EXPAND 
%{md5:%{User-Name},%{Acct-Session-ID},%{%{NAS-IPv6-Address}:-%{NAS-IP-Address}},%{Framed-IP-Address},%{NAS-Port}}
Fri Mar 15 12:55:40 2019 : Debug: (53)            --> 
4ef5bf8c3ec7fc4a503baa791573fc15
Fri Mar 15 12:55:40 2019 : Debug: (53) &Acct-Unique-Session-Id := 
4ef5bf8c3ec7fc4a503baa791573fc15
Fri Mar 15 12:55:40 2019 : Debug: (53)       } # update request = noop
Fri Mar 15 12:55:40 2019 : Debug: (53)     } # policy acct_unique = noop

Freeradius 2:
Fri Mar 15 12:58:27 2019 : Info: # Executing section preacct from file 
/radius3/conf/sites-enabled/conf
Fri Mar 15 12:58:27 2019 : Info: +group preacct {
Fri Mar 15 12:58:27 2019 : Info: [acct_unique] Hashing 'NAS-Port = 
918,Framed-IP-Address = 10.1.1.253,NAS-IP-Address = 1.2.3.4,Acct-Session-Id 
= "000D532D",User-Name = "testuser"'
Fri Mar 15 12:58:27 2019 : Info: [acct_unique] Acct-Unique-Session-ID = 
"b721c58aae1ea593".



More information about the Freeradius-Users mailing list