]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: seemless reload: Fix crash when an interface is specified.
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 15 Mar 2018 16:48:49 +0000 (17:48 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 19 Mar 2018 11:10:53 +0000 (12:10 +0100)
When doing a seemless reload, while receiving the sockets from the old process
the new process will die if the socket has been bound to a specific
interface.
This happens because the code that tries to parse the informations bogusly
try to set xfer_sock->namespace, while it should be setting wfer_sock->iface.

This should be backported to 1.8.

src/haproxy.c

index 0c823c49791960555b8c12e1d493046f785fc9d5..d5235ebaf184f1f74d36943f37702889acf95c64 100644 (file)
@@ -1180,7 +1180,7 @@ static int get_old_sockets(const char *unixsocket)
                                goto out;
                        }
                        memcpy(xfer_sock->iface, &tmpbuf[curoff], len);
-                       xfer_sock->namespace[len] = 0;
+                       xfer_sock->iface[len] = 0;
                        curoff += len;
                }
                if (curoff + sizeof(int) > maxoff) {