]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic-be: Correct the QUIC protocol lookup
authorFrederic Lecaille <flecaille@haproxy.com>
Mon, 18 Dec 2023 16:11:27 +0000 (17:11 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 11 Jun 2025 16:37:34 +0000 (18:37 +0200)
From connect_server(), QUIC protocol could not be retreived by protocol_lookup()
because of the PROTO_TYPE_STREAM default passed as argument. In place to support
QUIC srv->addr_type.proto_type may be safely passed.

src/backend.c

index 47be24460e39599ca20ef84a49de3525a5a2ad36..3a158e3a2628b2b598f43cd0614e8fa027975263 100644 (file)
@@ -1992,7 +1992,9 @@ int connect_server(struct stream *s)
                /* set the correct protocol on the output stream connector */
 
                if (srv) {
-                       if (conn_prepare(srv_conn, protocol_lookup(srv_conn->dst->ss_family, PROTO_TYPE_STREAM, srv->alt_proto), srv->xprt)) {
+                       struct protocol *proto = protocol_lookup(srv_conn->dst->ss_family, srv->addr_type.proto_type, srv->alt_proto);
+
+                       if (conn_prepare(srv_conn, proto, srv->xprt)) {
                                conn_free(srv_conn);
                                return SF_ERR_INTERNAL;
                        }