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.
This commit is contained in:
Thierry FOURNIER 2014-12-19 13:37:11 +01:00 committed by Willy Tarreau
parent 07e78c50b5
commit fe1ebcd2cf

View File

@ -804,7 +804,7 @@ int assign_server_address(struct session *s)
} }
/* Copy network namespace from client connection */ /* 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; s->flags |= SN_ADDR_SET;
return SRV_STATUS_OK; return SRV_STATUS_OK;