From: Willy Tarreau Date: Fri, 31 May 2024 16:37:56 +0000 (+0200) Subject: BUG/MINOR: tcpcheck: report correct error in tcp-check rule parser X-Git-Tag: v3.1-dev1~86 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a7afb6964b6f57c8d0481e2e391b7ec88552b26;p=thirdparty%2Fhaproxy.git BUG/MINOR: tcpcheck: report correct error in tcp-check rule parser When parsing tcp-check expect-header, a copy-paste error in the error message causes the name of the header to be reporetd as the invalid format string instead of its value. This is really harmless but should be backported to all versions to help users understand the cause of the problem when this happens. This was reported in GH issue #2586 by @Bbulatov. --- diff --git a/src/tcpcheck.c b/src/tcpcheck.c index b4f9590866..e820fdc2e8 100644 --- a/src/tcpcheck.c +++ b/src/tcpcheck.c @@ -3434,7 +3434,7 @@ struct tcpcheck_rule *parse_tcpcheck_expect(char **args, int cur_arg, struct pro px->conf.args.ctx = ARGC_SRV; lf_expr_init(&chk->expect.hdr.value_fmt); if (!parse_logformat_string(vpat, px, &chk->expect.hdr.value_fmt, 0, SMP_VAL_BE_CHK_RUL, errmsg)) { - memprintf(errmsg, "'%s' invalid log-format string (%s).\n", npat, *errmsg); + memprintf(errmsg, "'%s' invalid log-format string (%s).\n", vpat, *errmsg); goto error; } }