Cisco-AVPair = "client-mac-address=000f.ea20.e1ad" to Calling-Station-Id = "000f.ea20.e1ad" rule

Bjørn Mork bjorn at mork.no
Thu Feb 8 12:12:44 CET 2007


Victor <kha0s at 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




More information about the Freeradius-Users mailing list