]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: acl: implicit arguments of ACL keywords were not properly resolved
authorWilly Tarreau <w@1wt.eu>
Tue, 22 Oct 2013 17:10:06 +0000 (19:10 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 22 Oct 2013 17:31:04 +0000 (19:31 +0200)
William Lallemand reported a bug which happens when an ACL keyword using an
implicit argument (eg: a proxy name) is used : the keyword is not properly
set in the arglist field, resulting in an error about the previous keyword
being returned, or "(null)" if the faulty ACL appears first.

The bug only affects error reporting and is 1.5-specific, so no backport is
nedeed.

src/acl.c

index 7dc25fb9b4f37e084c582f468d97f2d3e311bd96..89bfdf5a0befcfc7bcbc1267f774e93dd07d6f2f 100644 (file)
--- a/src/acl.c
+++ b/src/acl.c
@@ -1134,6 +1134,10 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list *
                        expr->args[0].data.str.str = strdup("");
                        expr->args[0].data.str.size = 1;
                        expr->args[0].data.str.len = 0;
+
+                       al->ctx = ARGC_ACL;
+                       al->kw = expr->kw;
+                       al->conv = NULL;
                        arg_list_add(al, &expr->args[0], 0);
 
                        expr->args[1].type = ARGT_STOP;