]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: proxies: Do stage2 initialization for sinks too
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 17 Apr 2025 15:16:44 +0000 (17:16 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 17 Apr 2025 15:38:23 +0000 (17:38 +0200)
In check_config_validity(), we initialize the proxy in several stages.
We do so for the sink list for stage1, but not for stage2. It may not be
needed right now, but it may become needed in the future, so do it
anyway.

src/cfgparse.c

index 9c567d936fb0365d3f5446d7b7a34787554a63c7..7716b6cd50631e18926f89cfe065f35ecf20aed4 100644 (file)
@@ -4308,6 +4308,13 @@ init_proxies_list_stage2:
                        goto init_proxies_list_stage2;
        }
 
+       if (init_proxies_list == cfg_log_forward) {
+               init_proxies_list = sink_proxies_list;
+               /* check if list is not null to avoid infinite loop */
+               if (init_proxies_list)
+                       goto init_proxies_list_stage2;
+       }
+
        /*
         * Recount currently required checks.
         */