Package: haproxy / 1.5.8-3+deb8u2

from-upstream/0001-BUG-MINOR-config-fix-typo-in-condition-when-propagat.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From 8a95d8cd61c8ec61b9e1c9c9e571405878a40624 Mon Sep 17 00:00:00 2001
From: Willy Tarreau <w@1wt.eu>
Date: Thu, 18 Dec 2014 13:56:26 +0100
Subject: [PATCH] BUG/MINOR: config: fix typo in condition when propagating
 process binding

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cfgparse.c b/src/cfgparse.c
index 3e345e48c0e0..d91d010f83f1 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -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 */
-- 
2.1.4