]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: peers: fix error reporting of "bind" lines
authorWilly Tarreau <w@1wt.eu>
Fri, 20 May 2022 13:19:48 +0000 (15:19 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 20 May 2022 16:39:43 +0000 (18:39 +0200)
In case the str2listener() parser reports a generic error with no message
when parsing the argument of a "bind" statement in a "peers" section, the
reported error indicates an invalid address on the empty arg. This has
existed since 2.0 with commit 355b2033e ("MINOR: cfgparse: SSL/TLS binding
in "peers" sections."), so this must be backported till 2.0.

src/cfgparse.c

index c123ff1d72fb2caaa8e8d32fc01fcfb7e3f7f364..33645294962083b4a1719483621c55a58640c157 100644 (file)
@@ -720,7 +720,7 @@ int cfg_parse_peers(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]);
+                                                        file, linenum, args[0], args[1], args[1]);
                                err_code |= ERR_FATAL;
                                goto out;
                        }