From: MarcWort <113890636+MarcWort@users.noreply.github.com> Date: Mon, 30 Nov 2026 07:37:21 +0000 (+0100) Subject: BUG/MINOR: spoe: force "always" reuse policy when converting SPOP backend X-Git-Url: https://git.kaiwu.me/http/%22../$%7BISSUES%7D/static/%7B@url%7D?a=commitdiff_plain;h=58dc79b5e8dd230d082b8cb6747e3a7b68e17675;p=haproxy.git BUG/MINOR: spoe: force "always" reuse policy when converting SPOP backend When an SPOE agent uses a backend declared in "mode tcp", the backend is automatically converted to "mode spop" during configuration validation. The conversion is done in spoe_check(), which is called from flt_check(), i.e. after proxy_finalize() has already normalized the mode-dependent options of that backend. Seeing the backend was still in TCP mode at the time, its http-reuse policy was stripped down to "never", while explicit "mode spop" backends are unconditionally forced to "always". Fix this by forcing PR_O_REUSE_ALWS (after clearing the reuse bits) when the backend is converted to SPOP mode, which is exactly the policy an explicit "mode spop" backend ends up with in proxy_finalize(). This patch should fix the issue #3611. It should to be backported as far as 3.2. --- diff --git a/src/flt_spoe.c b/src/flt_spoe.c index d9072f4cb..f79f66337 100644 --- a/src/flt_spoe.c +++ b/src/flt_spoe.c @@ -1378,8 +1378,10 @@ static int spoe_check(struct proxy *px, struct flt_conf *fconf) return 1; } if (target->mode == PR_MODE_TCP) { - /* Convert legacy SPOP backend by added the right mode */ + /* Convert legacy SPOP backend by setting the right mode and features */ target->mode = PR_MODE_SPOP; + target->options &= ~PR_O_REUSE_MASK; + target->options |= PR_O_REUSE_ALWS; } if (target->mode != PR_MODE_SPOP) { ha_alert("Proxy %s : backend '%s' used by SPOE agent '%s' declared"