On Sat, Jun 16, 2012 at 12:56:54AM +0100, Matthew Newton wrote:
Given valuepair.c:495 ("Very bad code. Barely working, if at all.") and the case T_OP_REG_EQ section that is ifdef'd out, I'd suggest the following patch might be sensible.
diff --git a/src/lib/valuepair.c b/src/lib/valuepair.c index 150c311..98169ab 100644 --- a/src/lib/valuepair.c +++ b/src/lib/valuepair.c @@ -443,6 +443,8 @@ void pairmove(VALUE_PAIR **to, VALUE_PAIR **from) case T_OP_CMP_TRUE: case T_OP_CMP_FALSE: case T_OP_CMP_EQ: + case T_OP_REG_EQ: + case T_OP_REG_NE: tailfrom = i; continue;
Totally untested of course :).
That looks plausible, thank you. I'll leave Alan to decide whether to commit it. I have worked around the issue now as I needed the config to be deployable with stock 2.1.12.
The 'case T_OP_REG_EQ' has been removed in the master branch.
That makes sense for the control list: I think it was a legacy crutch so that Attribute = "value" would behave as Attribute == "value". Regards, Brian.