]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: define proper proto on QUIC servers
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 5 Jun 2025 13:18:44 +0000 (15:18 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 11 Jun 2025 16:37:34 +0000 (18:37 +0200)
Force QUIC as <mux_proto> for server if a QUIC address is used. This is
similarly to what is already done for bind instances on the frontend
side. This step ensures that conn_create_mux() will select the proper
protocol.

src/cfgparse.c

index 7660a6fb9a3fa66d728022e14957ba6abcb47b32..3b8eedcfb5146597fe1f44016316c5195c951596 100644 (file)
@@ -4115,6 +4115,13 @@ out_uri_auth_compat:
                        int mode = conn_pr_mode_to_proto_mode(curproxy->mode);
                        const struct mux_proto_list *mux_ent;
 
+                       if (srv_is_quic(newsrv)) {
+                               if (!newsrv->mux_proto) {
+                                       /* Force QUIC as mux-proto on server with quic addresses, similarly to bind on FE side. */
+                                       newsrv->mux_proto = get_mux_proto(ist("quic"));
+                               }
+                       }
+
                        if (!newsrv->mux_proto)
                                continue;