Cisco-AVpair accounting client-mac-address with unlang

Bryan Campbell bbc at misn.com
Thu Jan 7 20:21:14 CET 2010


Been there, done that . . .  search the mailing list archives from last 
month for this topic.

The hack turns the av-pair strings into attributes (if you add them to 
the dictionary).

Then you just have to adjust your SQL to address them for writing to the 
database.

Again . . . search the mailing list archives.  This has been done before 
by at least a dozen people.

bbc


Joe Maimon wrote:
> I have this in preacct, and it works.
> 
> 
>         if ("%{Cisco-AVpair[3]}" =~ /^client-mac-address=(.+)$/) {
>                 if (!Calling-Station-Id) {
>                         update request {
>                                 Calling-Station-Id := "%{1}"
>                         }
>                 }
>         }
> 
> However this is ugly. I dont want to have to know which Cisco-AVpair it 
> is, it should work whichever the order or number there is. It does not 
> seem to work any other way.
> 
> I know other directions to head include cisco_vsa_hack or the rlm_policy 
> and others.
> 
> I would appreciate any tips.
> 
> Thanks,
> 
> Joe
> -
> List info/subscribe/unsubscribe? See 
> http://www.freeradius.org/list/users.html



More information about the Freeradius-Users mailing list