From: Willy Tarreau Date: Thu, 5 May 2022 15:10:03 +0000 (+0200) Subject: BUG/MINOR: proxy/cli: don't enumerate internal proxies on "show backend" X-Git-Tag: v2.6-dev9~82 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f9f157537074b5165818118e986866ae20fbc1a;p=thirdparty%2Fhaproxy.git BUG/MINOR: proxy/cli: don't enumerate internal proxies on "show backend" Commit e7f74623e ("MINOR: stats: don't output internal proxies (PR_CAP_INT)") in 2.5 ensured we don't dump internal proxies on the stats page, but the same is needed for "show backend", as since the addition of the HTTP client it now appears there: $ socat /tmp/sock1 - <<< "show backend" # name This needs to be backported to 2.5. --- diff --git a/src/proxy.c b/src/proxy.c index 8b2299ce0f..555422b38e 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -2835,8 +2835,8 @@ static int cli_io_handler_show_backend(struct appctx *appctx) for (; appctx->ctx.cli.p0 != NULL; appctx->ctx.cli.p0 = curproxy->next) { curproxy = appctx->ctx.cli.p0; - /* looking for backends only */ - if (!(curproxy->cap & PR_CAP_BE)) + /* looking for non-internal backends only */ + if ((curproxy->cap & (PR_CAP_BE|PR_CAP_INT)) != PR_CAP_BE) continue; chunk_appendf(&trash, "%s\n", curproxy->id);