FreeBSD Bugzilla – Attachment 182699 Details for
Bug 219379
net/haproxy 1.7.3 and later have broken kqueue event handling when DNS resolvers are configured
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Copy of the dns.c patch that fixes kqueue handling
patch-src_dns.c (text/x-csrc), 1.34 KB, created by
jimp
on 2017-05-18 14:34:08 UTC
(
hide
)
Description:
Copy of the dns.c patch that fixes kqueue handling
Filename:
MIME Type:
Creator:
jimp
Created:
2017-05-18 14:34:08 UTC
Size:
1.34 KB
patch
obsolete
>From 64920538fc19f3c7f94dfa1e84a9a6569b8c3d37 Mon Sep 17 00:00:00 2001 >From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= <flecaille@haproxy.com> >Date: Fri, 12 May 2017 09:57:15 +0200 >Subject: [PATCH] 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 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/src/dns.c b/src/dns.c >index a118598..cb0a9a9 100644 >--- a/src/dns.c >+++ b/src/dns.c >@@ -1004,7 +1004,7 @@ int dns_init_resolvers(int close_socket) > > if (close_socket == 1) { > if (curnameserver->dgram) { >- close(curnameserver->dgram->t.sock.fd); >+ fd_delete(curnameserver->dgram->t.sock.fd); > memset(curnameserver->dgram, '\0', sizeof(*dgram)); > dgram = curnameserver->dgram; > } >-- >1.7.10.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 219379
: 182699
Working