Cisco-AVPair = "client-mac-address=000f.ea20.e1ad" to Calling-Station-Id = "000f.ea20.e1ad" rule
Hello, I have accouning packet with attributes like: Acct-Session-Id = "0/0/1/3_01000000000000CC" Cisco-AVPair = "client-mac-address=000f.ea20.e1ad" Framed-Protocol = PPP Framed-IP-Address = 192.168.0.235 User-Name = "global" Cisco-AVPair = "connect-progress=LAN Ses Up" Cisco-AVPair = "nas-tx-speed=100000000" Cisco-AVPair = "nas-rx-speed=100000000" ... How can i create (or rewrite if exist) Calling-Station-Id attribute with value 000f.ea20.e1ad (MAC from Cisco-AVPair = "client-mac-address=000f.ea20.e1ad") for SQL accounting? If exist Cisco-AVPair with client-mac-address, sure. ps: Im not sure than in current accounting packet its in %{Cisco-AVPair[0]} and not %{Cisco-AVPair[3]} or %{Cisco-AVPair[156]}, etc. Thanx! -- Best regards, Victor mailto:kha0s@ukr.net
Victor <kha0s@ukr.net> writes:
I have accouning packet with attributes like:
Acct-Session-Id = "0/0/1/3_01000000000000CC" Cisco-AVPair = "client-mac-address=000f.ea20.e1ad" Framed-Protocol = PPP Framed-IP-Address = 192.168.0.235 User-Name = "global" Cisco-AVPair = "connect-progress=LAN Ses Up" Cisco-AVPair = "nas-tx-speed=100000000" Cisco-AVPair = "nas-rx-speed=100000000" ...
How can i create (or rewrite if exist) Calling-Station-Id attribute with value 000f.ea20.e1ad (MAC from Cisco-AVPair = "client-mac-address=000f.ea20.e1ad") for SQL accounting? If exist Cisco-AVPair with client-mac-address, sure.
You can create a Client-Mac-Address attribute by enabling with_cisco_vsa_hack = no in the preprocess section of radiusd.conf. You can then use this atttribute to rewrite Calling-Station-Id if you like. See src/modules/rlm_preprocess/rlm_preprocess.c for details on the implementation. Bjørn
participants (2)
-
Bjørn Mork -
Victor