]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: tcpcheck: Disable QUICKACK for default tcp-check (with no rule)
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 30 Aug 2022 08:31:15 +0000 (10:31 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 30 Aug 2022 08:31:16 +0000 (10:31 +0200)
The commit 871dd8211 ("BUG/MINOR: tcpcheck: Disable QUICKACK only if data
should be sent after connect") introduced a regression. It removes the test
on the next rule to be able to disable TCP_QUICKACK when only a connect is
performed (so no next rule).

This patch must be backported as far as 2.2.

src/tcpcheck.c

index 7e7627a2c8fde95a7bb44f786bd0b45752991412..e597cf825fd6defcd9657790537e388d1f17d3c0 100644 (file)
@@ -1187,8 +1187,10 @@ enum tcpcheck_eval_ret tcpcheck_eval_connect(struct check *check, struct tcpchec
        if (proto && proto->connect) {
                int flags = 0;
 
+               if (!next)
+                       flags |= CONNECT_DELACK_ALWAYS;
                if (connect->options & TCPCHK_OPT_HAS_DATA)
-                       flags = (CONNECT_HAS_DATA|CONNECT_DELACK_ALWAYS);
+                       flags |= (CONNECT_HAS_DATA|CONNECT_DELACK_ALWAYS);
                status = proto->connect(conn, flags);
        }