From fe1ebcd2cf6cd928738055b4307b03196c412f70 Mon Sep 17 00:00:00 2001 From: Thierry FOURNIER Date: Fri, 19 Dec 2014 13:37:11 +0100 Subject: [PATCH] BUG/MAJOR: ns: HAProxy segfault if the cli_conn is not from a network connection The path "MAJOR: namespace: add Linux network namespace support" doesn't permit to use internal data producer like a "peers synchronisation" system. The result is a segfault when the internal application starts. This patch fix the commit b3e54fe387c7c1ea750f39d3029672d640c499f9 It is introduced in 1.6dev version, it doesn't need to be backported. --- src/backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend.c b/src/backend.c index 70ddaa7d1..32e19f915 100644 --- a/src/backend.c +++ b/src/backend.c @@ -804,7 +804,7 @@ int assign_server_address(struct session *s) } /* Copy network namespace from client connection */ - srv_conn->proxy_netns = cli_conn->proxy_netns; + srv_conn->proxy_netns = cli_conn ? cli_conn->proxy_netns : NULL; s->flags |= SN_ADDR_SET; return SRV_STATUS_OK;