]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: log-forward: always quit on parsing errors
authorWilly Tarreau <w@1wt.eu>
Wed, 16 Sep 2020 14:24:14 +0000 (16:24 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Sep 2020 14:25:29 +0000 (16:25 +0200)
The err_code and goto were misplaced, causing a fatal parse error to be
ignored when parsing a UDP listener's address. No backport is needed.

src/log.c

index 984a31a262d4a23118822fd59e5733a1e1c4689e..5f71bfe35f520f3c0f160fe36abeebecad0c71d4 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -3630,9 +3630,9 @@ int cfg_parse_log_forward(const char *file, int linenum, char **args, int kwm)
                        else {
                                ha_alert("parsing [%s:%d] : '%s %s' : error encountered while parsing listening address %s.\n",
                                         file, linenum, args[0], args[1], args[2]);
-                               err_code |= ERR_ALERT | ERR_FATAL;
-                               goto out;
                        }
+                       err_code |= ERR_ALERT | ERR_FATAL;
+                       goto out;
                }
                list_for_each_entry(l, &bind_conf->listeners, by_bind) {
                        /* Currently, only UDP handlers are allowed */