]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: peers/config: always fill the bind_conf's argument
authorWilly Tarreau <w@1wt.eu>
Tue, 5 Jul 2022 13:54:09 +0000 (15:54 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 5 Jul 2022 17:06:47 +0000 (19:06 +0200)
Some generic frontend errors mention the bind_conf by its name as
"bind '%s'", but if this is used on peers "bind" lines it shows
"(null)" because the argument is set to NULL in the call to
bind_conf_uniq_alloc() instead of passing the argument. Fortunately
that's trivial to fix.

This may be backported to older versions.

src/cfgparse.c

index 72512d89846637494b8afe4fd8dab07609a133a9..a98ebd58d57a78e76bb235528c8cf90b34323ce9 100644 (file)
@@ -703,7 +703,7 @@ int cfg_parse_peers(const char *file, int linenum, char **args, int kwm)
                }
 
                bind_conf = bind_conf_uniq_alloc(curpeers->peers_fe, file, linenum,
-                                                NULL, xprt_get(XPRT_RAW));
+                                                args[1], xprt_get(XPRT_RAW));
                if (*args[0] == 'b') {
                        struct listener *l;