From: Christopher Faulet Date: Tue, 5 Jan 2021 15:56:07 +0000 (+0100) Subject: BUG/MINOR: tcpcheck: Report a L7OK if the last evaluated rule is a send rule X-Git-Tag: v2.4-dev5~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d4977ae86bf70e6834f3e28bad5876769db5b07;p=thirdparty%2Fhaproxy.git BUG/MINOR: tcpcheck: Report a L7OK if the last evaluated rule is a send rule When all rules of a tcpcheck ruleset are successfully evaluated, the right check status must always be reported. It is true if the last evaluated rule is an expect or a connect rule. But not if it is a send rule. In this situation, nothing more is done until the check timeout expiration and a L7TOUT is reported instead of a L7OK. Now, by default, when all rules were successfully evaluated, a L7OK is reported. When the last evaluated rule is an expect or a connect, the behavior remains unchanged. This patch should fix the issue #1027. It must be backported as far as 2.2. --- diff --git a/src/tcpcheck.c b/src/tcpcheck.c index 0570b811b1..40c745091f 100644 --- a/src/tcpcheck.c +++ b/src/tcpcheck.c @@ -2120,6 +2120,8 @@ int tcpcheck_main(struct check *check) #endif set_server_check_status(check, status, msg); } + else + set_server_check_status(check, HCHK_STATUS_L7OKD, "(tcp-check)"); } else set_server_check_status(check, HCHK_STATUS_L7OKD, "(tcp-check)");