From 0d04410ebe1b245a62536cbda691487d7482953e Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 20 May 2022 15:19:48 +0200 Subject: [PATCH] BUG/MINOR: peers: fix error reporting of "bind" lines 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cfgparse.c b/src/cfgparse.c index c123ff1d72..3364529496 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -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; } -- 2.47.3