From: Willy Tarreau Date: Wed, 16 Sep 2026 08:47:32 +0000 (+0200) Subject: BUG/MINOR: proxy: pass PR_FL_DEF_EXPLICIT_MODE through cascaded defaults X-Git-Tag: v3.5-dev7~14 X-Git-Url: https://git.kaiwu.me/$%7BISSUES%7D/static/gitweb.js?a=commitdiff_plain;h=0d5403943453a10bd0c8d84face9bed7832c07dd;p=haproxy.git BUG/MINOR: proxy: pass PR_FL_DEF_EXPLICIT_MODE through cascaded defaults Basha Mougamadou reported that in the following setup: defaults http mode http timeout client 10s timeout server 10s defaults fast-http from http timeout server 1s Trying to add a backend using "from fast-http" would be rejected because the "fast-http" section has no explicit "mode" directive. This is indeed true, but not correct in that it is inherited from the "http" section where it is explicit, so there it must be considered as explicit as well. The reason is that the flag PR_FL_DEF_EXPLICIT_MODE is not inherited from defaults sections in proxy_defproxy_cpy(). Let's just add it to the set of such inherited flags to fix the problem. This must be backported to 3.4. --- diff --git a/src/proxy.c b/src/proxy.c index 3d8834222..b9efedaff 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -3343,7 +3343,7 @@ static int proxy_defproxy_cpy(struct proxy *curproxy, const struct proxy *defpro srv_settings_cpy(curproxy->defsrv, defproxy->defsrv, 0); } - curproxy->flags = (defproxy->flags & PR_FL_DISABLED); /* Only inherit from disabled flag */ + curproxy->flags = (defproxy->flags & (PR_FL_DISABLED | PR_FL_DEF_EXPLICIT_MODE)); /* Only inherit disabled + explicit_mode flags */ curproxy->options = defproxy->options; curproxy->options2 = defproxy->options2; curproxy->no_options = defproxy->no_options;