]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: check: ensure checks are compatible with QUIC servers
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 9 Sep 2025 08:46:47 +0000 (10:46 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 9 Sep 2025 14:55:09 +0000 (16:55 +0200)
Previously, checks were only performed on TCP. However, QUIC is now
supported on backend. Prior to this patch, check activation for QUIC
servers would result in a crash.

To ensure compatibility between QUIC servers and checks, adjust
protocol_lookup() performed during check connect step. Instead of using
a hardcoded PROTO_TYPE_STREAM, the value is now derived from server
settings.

This does not need to be backported.

src/tcpcheck.c

index ce82ea5071dbc563b95e2f493eccfea377c39a92..0e7930dfc11002473852be743072d0f93d1c288f 100644 (file)
@@ -1399,7 +1399,9 @@ enum tcpcheck_eval_ret tcpcheck_eval_connect(struct check *check, struct tcpchec
        *conn->dst = (is_addr(&connect->addr)
                      ? connect->addr
                      : (is_addr(&check->addr) ? check->addr : s->addr));
-       proto = protocol_lookup(conn->dst->ss_family, PROTO_TYPE_STREAM, 0);
+       proto = s ?
+         protocol_lookup(conn->dst->ss_family, s->addr_type.proto_type, s->alt_proto) :
+         protocol_lookup(conn->dst->ss_family, PROTO_TYPE_STREAM, 0);
 
        port = 0;
        if (connect->port)