unlang

Peter Balsianok balsianok.peter at gmail.com
Wed Apr 15 10:52:25 CEST 2015


Hi,

I have following unlang code in the preacct section

update request {
    Calling-Station-Id := "%{%{string:Class}:-%{Calling-Station-Id}}"
}

If my packet does not contain Class attribut, i expect that
Calling-Station-Id will not change.

(0) Received Accounting-Request Id 109 from 127.0.0.1:55999 to
127.0.0.1:1813 length 429
(0)   NAS-Port-Type = Virtual
(0)   Framed-Pool = 'BDSLpool'
(0)   Acct-Input-Octets-64 = 135967391
(0)   Called-Station-Id = 'orangenet'
(0)   Acct-Status-Type = Interim-Update
(0)   Connect-Info = '1000000000/1000000000'
(0)   Acct-Output-Packets = 1476063
(0)   Framed-IP-Netmask = 255.255.255.255
(0)   NAS-IP-Address = 213.151.237.216
(0)   Acct-Output-Octets = 1196651182
(0)   Qos-Policing-Profile-Name = 'in512K'
(0)   Acct-Session-Time = 2400
(0)   Medium-Type = DSL
(0)   User-Name = '0200000005 at orangenet.sk'
(0)   NAS-Identifier = 'N-001-BA-BAS-10'
(0)   Framed-IP-Address = 178.143.0.156
(0)   Acct-Input-Packets = 514504
(0)   Acct-Output-Octets-64 = 1196651182
(0)   Acct-Input-Octets = 135967391
(0)   Acct-Session-Id = 'FF10FFFF58000253-4F01A67C'
(0)   Acct-Output-Gigawords = 0
(0)   Service-Type = Framed-User
(0)   Acct-Update-Reason = AAA-LOAD-ACCT-PERIODIC
(0)   Acct-Authentic = RADIUS
(0)   NAS-Port-Id = 'L2TP LNS 595'
(0)   Qos-Metering-Profile-Name = 'down12288K'
(0)   Acct-Input-Packets-64 = 514504
(0)   Context-Name = 'INET'
(0)   Calling-Station-Id = '421905000001'
(0)   Framed-Protocol = PPP
(0)   Event-Timestamp = 'Jan  2 2012 14:23:41 CET'
(0)   Acct-Tunnel-Connection = 'LNS1:4945:9576'
(0)   Acct-Input-Gigawords = 0
(0)   Qos-Policy-Queuing = 'pwfq12288K'
(0)   NAS-Port = 2432696915
(0)   Acct-Output-Packets-64 = 1476063
(0) # Executing section preacct from file
../../raddb/auth/sites-enabled/default
(0)   preacct {
(0)     [preprocess] = ok
...
(0)     update request {
(0)       EXPAND %{%{string:Class}:-%{Calling-Station-Id}}
(0)          -->
(0)       Calling-Station-Id := ""
...

But Calling-Station-Id is empty.

Thank you for help.


More information about the Freeradius-Users mailing list