]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: config: don't propagate process binding for dynamic use_backend
authorCyril Bonté <cyril.bonte@free.fr>
Thu, 2 Oct 2014 17:56:25 +0000 (19:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 2 Oct 2014 19:17:11 +0000 (21:17 +0200)
A segfault was reported with the introduction of the propagate_processes()
function. It was caused when a use_backend rule was declared with a dynamic
name, using a log-format string. The backend is not resolved during the
configuration, which lead to the segfault.

The patch prevents the process binding propagation for such dynamic rules, it
should also be backported to 1.5.

src/cfgparse.c

index a5af90b24a120d9276d383251d5a15a07f92d0bc..72f3d92352ca248ddadc2076aa19f93f67e748b8 100644 (file)
@@ -6067,6 +6067,8 @@ void propagate_processes(struct proxy *from, struct proxy *to)
 
        /* use_backend */
        list_for_each_entry(rule, &from->switching_rules, list) {
+               if (rule->dynamic)
+                       continue;
                to = rule->be.backend;
                propagate_processes(from, to);
        }