From: Frederic Lecaille Date: Mon, 18 Dec 2023 16:11:27 +0000 (+0100) Subject: MINOR: quic-be: Correct the QUIC protocol lookup X-Git-Tag: v3.3-dev2~104 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7c76252d8a31a611fa1763ca94bb1c38f17e4f8b;p=thirdparty%2Fhaproxy.git MINOR: quic-be: Correct the QUIC protocol lookup 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. --- diff --git a/src/backend.c b/src/backend.c index 47be24460..3a158e3a2 100644 --- a/src/backend.c +++ b/src/backend.c @@ -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; }