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