diff options
author | demon <demon@FreeBSD.org> | 2017-05-19 03:22:57 +0800 |
---|---|---|
committer | demon <demon@FreeBSD.org> | 2017-05-19 03:22:57 +0800 |
commit | bb46d3f3f595e84f13a33b251d33e23aa621f2d1 (patch) | |
tree | 6ae8b9d3cc803e2ef953efb022f8aaa51198f260 | |
parent | eed58fa73140141a15150274a77c2f422cc9686c (diff) | |
download | freebsd-ports-gnome-bb46d3f3f595e84f13a33b251d33e23aa621f2d1.tar.gz freebsd-ports-gnome-bb46d3f3f595e84f13a33b251d33e23aa621f2d1.tar.zst freebsd-ports-gnome-bb46d3f3f595e84f13a33b251d33e23aa621f2d1.zip |
Add a patch from upstream to fix haproxy operations when dynamic dns
resolvers are used.
PR: 219379
Submitted by: jimp@pfsense.org
-rw-r--r-- | net/haproxy/Makefile | 2 | ||||
-rw-r--r-- | net/haproxy/files/patch-fix-dns | 33 |
2 files changed, 34 insertions, 1 deletions
diff --git a/net/haproxy/Makefile b/net/haproxy/Makefile index bf9a0a6babfc..5c02b931041b 100644 --- a/net/haproxy/Makefile +++ b/net/haproxy/Makefile @@ -3,7 +3,7 @@ PORTNAME= haproxy PORTVERSION= 1.7.5 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net www MASTER_SITES= http://www.haproxy.org/download/1.7/src/ DISTFILES= ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX} diff --git a/net/haproxy/files/patch-fix-dns b/net/haproxy/files/patch-fix-dns new file mode 100644 index 000000000000..e6aee14ab79a --- /dev/null +++ b/net/haproxy/files/patch-fix-dns @@ -0,0 +1,33 @@ +From: Frédéric Lécaille <flecaille@haproxy.com> +Date: Fri, 12 May 2017 07:57:15 +0000 (+0200) +Subject: BUG/MAJOR: dns: Broken kqueue events handling (BSD systems). +X-Git-Url: http://git.haproxy.org/?p=haproxy.git;a=commitdiff_plain;h=64920538fc19f3c7f94dfa1e84a9a6569b8c3d37 + +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. +--- + +diff --git a/src/dns.c b/src/dns.c +index a118598..cb0a9a9 100644 +--- src/dns.c ++++ 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; + } |