Package: haproxy / 1.5.8-3+deb8u2

from-upstream/0001-BUG-MEDIUM-config-do-not-propagate-processes-between.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
From ed061c0590109dde6cd77cd963bebc46ba0cd0cc Mon Sep 17 00:00:00 2001
From: Willy Tarreau <w@1wt.eu>
Date: Thu, 18 Dec 2014 14:00:43 +0100
Subject: [PATCH] BUG/MEDIUM: config: do not propagate processes between
 stopped processes

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.
(cherry picked from commit f6b70013389cf9378c6a4d55d3d570de4f95c33c)
---
 src/cfgparse.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/cfgparse.c b/src/cfgparse.c
index f5eed03cce91..2a27d8b0a0f9 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -6009,6 +6009,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);
-- 
2.1.4