BUG/MAJOR: mworker: fix infinite loop on master with no proxies.
The master is re-exec with an empty proxies list if no master CLI is
configured.
This results in infinite loop since last patch:
3b68b602 ("BUG/MAJOR: log-forward: Fix log-forward proxies not fully initialized")
This patch avoid to loop again on log-forward proxies list if empty.
This patch should be backported until v2.3
(cherry picked from commit 8032a276ce8007020366d18ebd7400ad5dedc4f4)
Signed-off-by: William Lallemand <wlallemand@haproxy.org>
(cherry picked from commit ce1cc9682f8f5df109ec2614f86bb312f1e4eba8)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 3a2fedc1bec236f02c7de34b4da4aafe5e699767)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/src/cfgparse.c b/src/cfgparse.c
index cdb4161..70d4820 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -3985,7 +3985,9 @@
*/
if (init_proxies_list == proxies_list) {
init_proxies_list = cfg_log_forward;
- goto init_proxies_list_stage1;
+ /* check if list is not null to avoid infinite loop */
+ if (init_proxies_list)
+ goto init_proxies_list_stage1;
}
/***********************************************************/
@@ -4240,7 +4242,9 @@
*/
if (init_proxies_list == proxies_list) {
init_proxies_list = cfg_log_forward;
- goto init_proxies_list_stage2;
+ /* check if list is not null to avoid infinite loop */
+ if (init_proxies_list)
+ goto init_proxies_list_stage2;
}
/*