]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: server: duplicate server alt_proto in srv_settings_cpy()
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 29 Jul 2026 08:40:18 +0000 (10:40 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 29 Jul 2026 13:21:35 +0000 (15:21 +0200)
Server <alt_proto> may be set to select an alternative protocol to the
default one depending on the server address type. Currently, the main
usage is for MPTCP on the backend side.

This field was not duplicated in srv_settings_cpy(). This has no impact
with default-server as such entry do not have any address configured.
However, this causes an issue with server-template, as duplicated
entries will remain with an unset <alt_proto> field. This results in an
incorrect TCP protocol selected on connect instead of MPTCP.

Fix this by ensuring that <alt_proto> is copied in srv_settings_cpy().
This is only performed for server-templates, as with other settings
relative to the server address.

This must be backported up to 3.2.

src/server.c

index 1f328a887736d940b81ac59a8ff5524a401b086e..a28b2dba4abd235885397a34bd875b2007a53059 100644 (file)
@@ -2953,6 +2953,7 @@ void srv_settings_cpy(struct server *srv, const struct server *src, int srv_tmpl
                srv->addr = src->addr;
                srv->addr_type = src->addr_type;
                srv->svc_port = src->svc_port;
+               srv->alt_proto = src->alt_proto;
        }
 
        srv->pp_opts = src->pp_opts;