]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: config: fix typo in condition when propagating process binding
authorWilly Tarreau <w@1wt.eu>
Thu, 18 Dec 2014 12:56:26 +0000 (13:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 18 Dec 2014 13:03:31 +0000 (14:03 +0100)
propagate_processes() has a typo in a condition :

if (!from->cap & PR_CAP_FE)
return;

The return is never taken because each proxy has at least one capability
so !from->cap always evaluates to zero. Most of the time the caller already
checks that <from> is a frontend. In the cases where it's not tested
(use_backend, reqsetbe), the rules have been checked for the context to
be a frontend as well, so in the end it had no nasty side effect.

This should be backported to 1.5.

src/cfgparse.c

index 3e345e48c0e0f008d1e89e8055280bb173ccf708..d91d010f83f15ff8c4c8f6bd5532b302439a35e4 100644 (file)
@@ -6102,7 +6102,7 @@ void propagate_processes(struct proxy *from, struct proxy *to)
                from = to;
        }
 
-       if (!from->cap & PR_CAP_FE)
+       if (!(from->cap & PR_CAP_FE))
                return;
 
        /* default_backend */