From: Amaury Denoyelle Date: Mon, 20 Jul 2026 13:14:52 +0000 (+0200) Subject: MINOR: proxy: rename proxies list to all_proxies X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;ds=sidebyside;p=thirdparty%2Fhaproxy.git MINOR: proxy: rename proxies list to all_proxies Rename global list to . This better highlights the difference with the other list . The first one contain every proxy instances, whereas the second list is only a subset of user visible proxies. In the future, it should be sufficient to only keep list. However, this requires careful code analysis, in particular to ensure proxies iteration are always executed with the proper capabilities filter. --- diff --git a/include/haproxy/proxy.h b/include/haproxy/proxy.h index 9b6fa5b9e..ff1526801 100644 --- a/include/haproxy/proxy.h +++ b/include/haproxy/proxy.h @@ -36,7 +36,7 @@ #include extern struct list main_proxies; -extern struct list proxies; +extern struct list all_proxies; extern struct ceb_root *used_proxy_id; /* list of proxy IDs in use */ extern unsigned int error_snapshot_id; /* global ID assigned to each error then incremented */ extern struct ceb_root *proxy_by_name; /* tree of proxies sorted by name */ diff --git a/src/haproxy.c b/src/haproxy.c index 69d5414ea..5838271a4 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2258,7 +2258,7 @@ static void step_init_2(int argc, char** argv) clock_adjust_now_offset(); ready_date = date; - list_for_each_entry(px, &proxies, global_list) { + list_for_each_entry(px, &all_proxies, global_list) { struct server *srv; struct post_proxy_check_fct *ppcf; struct post_server_check_fct *pscf; diff --git a/src/proxy.c b/src/proxy.c index af90dcbbf..7a87d79de 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -82,7 +82,7 @@ struct list main_proxies = LIST_HEAD_INIT(main_proxies); /* List of all proxies, except defaults. * Currently only used for post_proxy_check_fct and post_server_check_fct post init. */ -struct list proxies = LIST_HEAD_INIT(proxies); +struct list all_proxies = LIST_HEAD_INIT(all_proxies); struct ceb_root *used_proxy_id = NULL; /* list of proxy IDs in use */ struct ceb_root *proxy_by_name = NULL; /* tree of proxies sorted by name */ @@ -3214,7 +3214,7 @@ int setup_new_proxy(struct proxy *px, const char *name, unsigned int cap, char * proxy_store_name(px); if (!(cap & PR_CAP_DEF)) - LIST_APPEND(&proxies, &px->global_list); + LIST_APPEND(&all_proxies, &px->global_list); return 1; @@ -4978,7 +4978,7 @@ static int cli_parse_add_backend(char **args, char *payload, struct appctx *appc dynpx_next_id = px->uuid; /* Insert into list of visible proxies. Note that - * insertion in has already been performed in + * insertion in has already been performed in * setup_new_proxy() via alloc_new_proxy(). */ main_proxies_register(px);