]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: config: ACL compatibility check on "redirect" was wrong
authorWilly Tarreau <w@1wt.eu>
Mon, 25 Mar 2013 18:16:31 +0000 (19:16 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Mar 2013 18:21:56 +0000 (19:21 +0100)
The check was made on "cond" instead of "rule->cond", so it never
emitted any warning since either the rule was NULL or it was set to
the last condition met.

This is 1.5-specific and the bug was introduced by commit 4baae248
in 1.5-dev17, so no backport is needed.

src/cfgparse.c

index 2c2faf558637efe45e7ba498d132f9f27214f19d..8c959debff9572dd9469ec1eb2bc1d6b09325a58 100644 (file)
@@ -2689,7 +2689,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
 
                LIST_ADDQ(&curproxy->redirect_rules, &rule->list);
                err_code |= warnif_rule_after_use_backend(curproxy, file, linenum, args[0]);
-               err_code |= warnif_cond_requires_resp(cond, file, linenum);
+               err_code |= warnif_cond_requires_resp(rule->cond, file, linenum);
        }
        else if (!strcmp(args[0], "use_backend")) {
                struct switching_rule *rule;