From: Amaury Denoyelle Date: Wed, 29 Jul 2026 08:40:18 +0000 (+0200) Subject: BUG/MINOR: server: duplicate server alt_proto in srv_settings_cpy() X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=4e8cf9128a3dc07988f049f977739f08f2dc33bd;p=thirdparty%2Fhaproxy.git BUG/MINOR: server: duplicate server alt_proto in srv_settings_cpy() Server 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 field. This results in an incorrect TCP protocol selected on connect instead of MPTCP. Fix this by ensuring that 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. --- diff --git a/src/server.c b/src/server.c index 1f328a887..a28b2dba4 100644 --- a/src/server.c +++ b/src/server.c @@ -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;