]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: check: use auto SNI for QUIC checks
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 30 Oct 2025 10:39:42 +0000 (11:39 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 14 Nov 2025 12:42:08 +0000 (13:42 +0100)
By default, check SNI is set to the Host header when an HTTPS check is
performed. This patch extends this mode so that it is also active when
QUIC checks are executed.

This patch should improve reuse rate with checks. Indeed, SNI is also
already automatically set for normal traffic. The same value must be
used during check so that a connection hash match can be found.

src/tcpcheck.c

index 00825422a1ceccb6ed994c24c57fab37782960ab..e353ef62de1df55cf402590d01dac9d5a6c99869 100644 (file)
@@ -1234,8 +1234,10 @@ static inline int tcpcheck_connect_use_ssl(const struct check *check,
 {
        if (connect->options & TCPCHK_OPT_SSL)
                return 1;
-       if (connect->options & TCPCHK_OPT_DEFAULT_CONNECT)
-               return (check->xprt == xprt_get(XPRT_SSL));
+       if (connect->options & TCPCHK_OPT_DEFAULT_CONNECT) {
+               return (check->xprt == xprt_get(XPRT_SSL) ||
+                       check->xprt == xprt_get(XPRT_QUIC));
+       }
        return 0;
 }