From: Olivier Houchard Date: Fri, 28 Aug 2026 13:54:09 +0000 (+0200) Subject: MEDIUM: servers: Do not allow reverse HTTP with per-tg fd tables X-Git-Tag: v3.5-dev6~56 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=0a2e5ae27030ce4082e8c4f332b21dd2ca898111;p=haproxy.git MEDIUM: servers: Do not allow reverse HTTP with per-tg fd tables We can't steal the connection of other thread groups with per-thread group file descriptor tables, so disallow its usage if there's a server that uses reverse HTTP, as requests could fail because we would not have enough connections. --- diff --git a/src/proxy.c b/src/proxy.c index 85cc96667..d08cbd0d9 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -2767,12 +2767,22 @@ int proxy_finalize(struct proxy *px, int *err_code) if (px->mode == PR_MODE_SPOP) px->options |= PR_O_REUSE_ALWS; - if ((px->mode != PR_MODE_HTTP) && newsrv->flags & SRV_F_RHTTP) { - ha_alert("%s '%s' : server %s uses reverse HTTP addressing which can only be used with HTTP mode.\n", - proxy_type_str(px), px->id, newsrv->id); - cfgerr++; - *err_code |= ERR_FATAL | ERR_ALERT; - goto out; + if (newsrv->flags & SRV_F_RHTTP) { + if ((global.tune.options & GTUNE_NO_TG_FD_SHARING) && + (global.nbtgroups > 1)) { + ha_alert("%s '%s' : server %s uses reverse HTTP addressing which is incompatible with tune.fd.tables per-thread-group.\n", + proxy_type_str(px), px->id, newsrv->id); + cfgerr++; + *err_code |= ERR_FATAL | ERR_ALERT; + goto out; + } + if (px->mode != PR_MODE_HTTP) { + ha_alert("%s '%s' : server %s uses reverse HTTP addressing which can only be used with HTTP mode.\n", + proxy_type_str(px), px->id, newsrv->id); + cfgerr++; + *err_code |= ERR_FATAL | ERR_ALERT; + goto out; + } } }