Cisco-AVpair accounting client-mac-address with unlang
Alan DeKok
aland at deployingradius.com
Fri Jan 8 18:02:54 CET 2010
Joe Maimon wrote:
> I could use vsa hack. But it is a hack and its impact is a bit larger
> than the actual functionality I want. I just want to leave everything
> else unchanged but to have the mac address represented as
> calling-station-id, which for anything ethernet and not POTS related, it
> is.
That's a pretty specific need. I suggest Perl for complex programming.
> unlang or other directed processing is the proper solution in my view,
> and it is working. It is just that I must predict which avpair to
> operate on which is troubling. In a start message, its the second one.
> In interim-update, its the fourth. For my purposes, only the Start one
> is of value, but having to know the order of attributes seems to be a
> bit flimsy.
Well... yes.
> Its problematic enough that a NAS can behave badly when sending them
> attributes in the wrong order. (cisco-avpair = lcp:interface-config="")
>
> (And how does the vsa_hack deal with this form of the avpair?)
It doesn't do anything with it.
> It does make the code a bit more hairy - I have been making a stab at
> this and it seems to be quite ugly.
Hmm... much of this work could be relegated to the radius_do_cmp()
function. It needs to do:
a) return if condition matches
b) continue if it doesn't match
With some sanity checks to ensure that:
(Foo != bar)
is the same as
!(Foo == bar)
Alan DeKok.
More information about the Freeradius-Users
mailing list