Skip to content

Commit 995bba7

Browse files
wtarreaua-denoyelle
authored andcommitted
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. (cherry picked from commit 8a7afb6) Signed-off-by: Amaury Denoyelle <[email protected]>
1 parent 6d0ac5d commit 995bba7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tcpcheck.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3434,7 +3434,7 @@ struct tcpcheck_rule *parse_tcpcheck_expect(char **args, int cur_arg, struct pro
34343434
px->conf.args.ctx = ARGC_SRV;
34353435
lf_expr_init(&chk->expect.hdr.value_fmt);
34363436
if (!parse_logformat_string(vpat, px, &chk->expect.hdr.value_fmt, 0, SMP_VAL_BE_CHK_RUL, errmsg)) {
3437-
memprintf(errmsg, "'%s' invalid log-format string (%s).\n", npat, *errmsg);
3437+
memprintf(errmsg, "'%s' invalid log-format string (%s).\n", vpat, *errmsg);
34383438
goto error;
34393439
}
34403440
}

0 commit comments

Comments
 (0)