BUG/MINOR: startup: don't use internal proxies to compute the maxconn

With internal proxies using the SSL activated (httpclient for example)
the automatic computation of the maxconn is wrong because these proxies
are always activated by default.

This patch fixes the issue by not counting these internal proxies during
the computation.

Must be backported as far as 2.5.

(cherry picked from commit 0adafb307e)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit b1005c0ba1db639c15d4fee17820af40039c1894)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
This commit is contained in:
William Lallemand
2022-12-13 18:17:44 +01:00
committed by Christopher Faulet
parent a2ab8f902d
commit d3c486f567

View File

@ -5211,8 +5211,10 @@ int ssl_sock_prepare_srv_ctx(struct server *srv)
{
int cfgerr = 0;
SSL_CTX *ctx;
/* Automatic memory computations need to know we use SSL there */
global.ssl_used_backend = 1;
/* Automatic memory computations need to know we use SSL there
* If this is an internal proxy, don't use it for the computation */
if (!(srv->proxy && srv->proxy->cap & PR_CAP_INT))
global.ssl_used_backend = 1;
/* Initiate SSL context for current server */
if (!srv->ssl_ctx.reused_sess) {