]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: dns: Broken kqueue events handling (BSD systems).
authorFrédéric Lécaille <flecaille@haproxy.com>
Fri, 12 May 2017 07:57:15 +0000 (09:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 12 May 2017 13:49:05 +0000 (15:49 +0200)
commit64920538fc19f3c7f94dfa1e84a9a6569b8c3d37
tree4e0a6a7da63daccdf305e9870bec2bc2c8f3756b
parent047000a8bddfffece923d254c72148d1d3211c69
BUG/MAJOR: dns: Broken kqueue events handling (BSD systems).

Some DNS related network sockets were closed without unregistering their file
descriptors from their underlying kqueue event sets. This patch replaces calls to
close() by fd_delete() calls to that to delete such events attached to DNS
network sockets from the kqueue before closing the sockets.

The bug was introduced by commit 26c6eb8 ("BUG/MAJOR: dns: restart sockets
after fork()") which was backported in 1.7 so this fix has to be backported
there as well.

Thanks to Jim Pingle who reported it and indicated the faulty commit, and
to Lukas Tribus for the trace showing the bad file descriptor.
src/dns.c