]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: config: do not propagate processes between stopped processes
authorWilly Tarreau <w@1wt.eu>
Thu, 18 Dec 2014 13:00:43 +0000 (14:00 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 18 Dec 2014 13:03:31 +0000 (14:03 +0100)
Immo Goltz reported a case of segfault while parsing the config where
we try to propagate processes across stopped frontends (those with a
"disabled" statement). The fix is trivial. The workaround consists in
commenting out these frontends, although not always easy.

This fix must be backported to 1.5.

src/cfgparse.c

index d91d010f83f15ff8c4c8f6bd5532b302439a35e4..a423d76294ae76a177727cc30e4d6a2c6e751c5d 100644 (file)
@@ -6105,6 +6105,9 @@ void propagate_processes(struct proxy *from, struct proxy *to)
        if (!(from->cap & PR_CAP_FE))
                return;
 
+       if (from->state == PR_STSTOPPED)
+               return;
+
        /* default_backend */
        if (from->defbe.be)
                propagate_processes(from, from->defbe.be);