Making not equals and not match regex's handle multi-value pairs.

Joe Maimon jmaimon at ttec.com
Fri Nov 4 21:37:47 CET 2005



Alister Winfield wrote:

> Sent this before but I had a mixed up valuepair.c which ment I couldn't
> just get a diff ;-(. Now I have found time to unpick the changes to make
> a sane copy of valuepair and, therefore, a good looking diff.
> 
> Re-iterating the problem... When trying to get a not equals match the
> existing code, up to 1.0.5 and probably in the later CVS HEAD, only
> notices the first value, which, if it doesn't match returns a true
> response. Should you actually have many values for the same attribute
> then you may want the test to only return true if none of the values of
> that attribute are a match.
> 
> To get the effect of finding that a value doesn't appear at all for a
> given attribute this patch avoids negative tests and instead does a
> positive match and inverts the response at the exit points in the
> function as required. BTW. Hopefully this doesn't touch the current
> behaviour for anything else certainly my tests suggest its fine. 
> 
> This patch looks good for the latest released version 1.0.5.
> 
> --

Not certain I understand what you mean,

Tell me if the attached patch looks like what you want and I will test it.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 200-fix-valuepair-cmp-true-ne-regne.patch
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20051104/44b5fa5c/attachment.ksh>


More information about the Freeradius-Devel mailing list