]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: dns: restart sockets after fork()
authorBaptiste Assmann <bedis9@gmail.com>
Thu, 2 Feb 2017 22:14:51 +0000 (23:14 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 3 Feb 2017 06:22:06 +0000 (07:22 +0100)
commit26c6eb838311c31db0002c7d3c93a81297012d44
tree27db14071a32da58e83b52f5ff0bb91e251d6791
parent5cd1b9222eabcd73f387fd65b075b2af59014558
BUG/MAJOR: dns: restart sockets after fork()

UDP sockets used to send DNS queries are created before fork happens and
this is a big problem because all the processes (in case of a
configuration starting multiple processes) share the same socket. Some
processes may consume responses dedicated to an other one, some servers
may be disabled, some IPs changed, etc...

As a workaround, this patch close the existing socket and create a new
one after the fork() has happened.

[wt: backport this to 1.7]
src/haproxy.c