]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: proxy: don't dump servers of internal proxies
authorWilliam Lallemand <wlallemand@haproxy.org>
Wed, 25 Aug 2021 16:15:31 +0000 (18:15 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 25 Aug 2021 16:15:31 +0000 (18:15 +0200)
Patch 211c967 ("MINOR: httpclient: add the server to the proxy") broke
the reg-tests that do a "show servers state".

Indeed the servers of the proxies flagged with PR_CAP_INT are dumped in
the output of this CLI command.

This patch fixes the issue par ignoring the PR_CA_INT proxies in the
dump.

src/proxy.c

index 3391dc90bbd9ecc0d486e97659e40757f731860d..2642b44a81e453c181f81bd19e7d3af197d09d53 100644 (file)
@@ -2577,7 +2577,7 @@ static int cli_io_handler_servers_state(struct appctx *appctx)
        for (; appctx->ctx.cli.p0 != NULL; appctx->ctx.cli.p0 = curproxy->next) {
                curproxy = appctx->ctx.cli.p0;
                /* servers are only in backends */
-               if (curproxy->cap & PR_CAP_BE) {
+               if ((curproxy->cap & PR_CAP_BE) && !(curproxy->cap & PR_CAP_INT)) {
                        if (!dump_servers_state(si))
                                return 0;
                }