Cisco-AVpair accounting client-mac-address with unlang
Joe Maimon
jmaimon at ttec.com
Thu Jan 7 20:42:25 CET 2010
I have searched. I am unsatisfied with the results.
The cisco_vsa_hack may have unintended consequences.
unlang should properly loop over the vp list, like other paircompares do.
I have patched this kind of oversight before elsewhere, not sure if
thats the right approach here.
Bryan Campbell wrote:
> 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
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
>
More information about the Freeradius-Users
mailing list