]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: server: Fix a wrong error message during 'usesrc' keyword parsing.
authorFrédéric Lécaille <flecaille@haproxy.com>
Fri, 14 Apr 2017 13:19:56 +0000 (15:19 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 15 Apr 2017 11:42:55 +0000 (13:42 +0200)
'usesrc' setting is not permitted on 'server' lines if not provided after
'source' setting. This is now also the case on 'default-server' lines.
Without this patch parse_server() parser displayed that 'usersrc' is
an unknown keyword.

Should have come with dba9707 commit.

src/server.c

index b5d889005e2d8cf255764553db52e4e3983bddf0..40a8d7f2b9e13f25eb03b5ad312b5d74be8796e9 100644 (file)
@@ -2207,7 +2207,7 @@ int parse_server(const char *file, int linenum, char **args, struct proxy *curpr
                                }
                                cur_arg += 2;
                        }
-                       else if (!defsrv && !strcmp(args[cur_arg], "usesrc")) {  /* address to use outside: needs "source" first */
+                       else if (!strcmp(args[cur_arg], "usesrc")) {  /* address to use outside: needs "source" first */
                                Alert("parsing [%s:%d] : '%s' only allowed after a '%s' statement.\n",
                                      file, linenum, "usesrc", "source");
                                err_code |= ERR_ALERT | ERR_FATAL;