Cisco-AVpair accounting client-mac-address with unlang

Joe Maimon jmaimon at ttec.com
Mon Jan 11 01:25:22 CET 2010



Alan DeKok wrote:
> Joe Maimon wrote:

>
>> 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.
> -


Ok, I have a preliminary patch, targeted at a pre-2.1.8 code base (git 
stable 20090923)

480-evaluate-unlang-allvps.dpatch

(attached and pushed to my out of date github fork/branch)

It is indeed fairly ugly. I have not as of yet determined whether to 
hang operational hat on it yet.

This patch aims to have the following as true:

(Foo != bar) == !(Foo == bar) && (Foo !~ bar) == !(Foo =~ bar)

Which is inline with the patch I currently use operationally.

200-cmp-operators-fix.dpatch

(attached)

I do not believe that this behavior is present unpatched.

I am undecided as to proper behavior for many of the other tests.

Thank you for all your help and feedback.

Joe




-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 200-cmp-operators-fix.dpatch
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20100110/d49e8969/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 480-evaluate-unlang-allvps.dpatch
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20100110/d49e8969/attachment-0001.ksh>


More information about the Freeradius-Users mailing list