]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: proxy/server: Skip per-proxy/server post-check for disabled proxies
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 2 Nov 2020 15:20:13 +0000 (16:20 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 3 Nov 2020 09:23:00 +0000 (10:23 +0100)
per-proxy and per-server post-check callback functions must be skipped for
disabled proxies because most of the configuration validity check is skipped for
these proxies.

This patch must be backported as far as 2.1.

src/haproxy.c

index 3e6fd18f72992eeca1b25c91e044f931021b959f..2b5aa706560229200c8c9354e204cd0c8b7f2f1b 100644 (file)
@@ -1958,6 +1958,9 @@ static void init(int argc, char **argv)
                struct post_proxy_check_fct *ppcf;
                struct post_server_check_fct *pscf;
 
+               if (px->disabled)
+                       continue;
+
                list_for_each_entry(pscf, &post_server_check_list, list) {
                        for (srv = px->srv; srv; srv = srv->next)
                                err_code |= pscf->fct(srv);