]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: proto_tcp: fix parsing of "table" in track-sc1/2
authorWilly Tarreau <w@1wt.eu>
Sun, 9 Dec 2012 15:57:27 +0000 (16:57 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 9 Dec 2012 15:57:27 +0000 (16:57 +0100)
Recent commit 5d5b5d8e left the "table" argument in the list of
arguments to parse.

src/proto_tcp.c

index 12e92da1104872307e43449bb6b4eb43642b80e5..4c4f5a78a4b876485d9463efcfa4b901cba95c3f 100644 (file)
@@ -1113,7 +1113,8 @@ static int tcp_parse_request_rule(char **args, int arg, int section_type,
                        curpx->acl_requires |= ACL_USE_L7_ANY;
 
                if (strcmp(args[arg], "table") == 0) {
-                       if (!args[arg + 1]) {
+                       arg++;
+                       if (!args[arg]) {
                                memprintf(err,
                                          "'%s %s %s' : missing table name",
                                          args[0], args[1], args[kw]);
@@ -1121,7 +1122,7 @@ static int tcp_parse_request_rule(char **args, int arg, int section_type,
                                return -1;
                        }
                        /* we copy the table name for now, it will be resolved later */
-                       rule->act_prm.trk_ctr.table.n = strdup(args[arg + 1]);
+                       rule->act_prm.trk_ctr.table.n = strdup(args[arg]);
                        arg++;
                }
                rule->act_prm.trk_ctr.expr = expr;