From: Aurelien DARRAGON Date: Fri, 9 May 2025 14:41:30 +0000 (+0200) Subject: MEDIUM: proxy: use global proxy list for REGISTER_POST_PROXY_CHECK() hook X-Git-Tag: v3.3-dev1~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e262e4bbe4c50ab16131ca49c0f687f536657fa8;p=thirdparty%2Fhaproxy.git MEDIUM: proxy: use global proxy list for REGISTER_POST_PROXY_CHECK() hook REGISTER_POST_PROXY_CHECK() used to iterate over "main" proxies to run registered callbacks. This means hidden proxies (and their servers) did not get a chance to get post-checked and could cause issues if some post- checks are expected to be executed on all proxies no matter their type. Instead we now rely on the global proxies list. Another side effect is that the REGISTER_POST_SERVER_CHECK() now runs as well for servers from proxies that are not part of the main proxies list. --- diff --git a/src/haproxy.c b/src/haproxy.c index 3a2e84f45..08ca84f1c 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2101,7 +2101,7 @@ static void step_init_2(int argc, char** argv) clock_adjust_now_offset(); ready_date = date; - for (px = proxies_list; px; px = px->next) { + list_for_each_entry(px, &proxies, global_list) { struct server *srv; struct post_proxy_check_fct *ppcf; struct post_server_check_fct *pscf;