From owner-svn-ports-head@freebsd.org Thu May 18 19:22:59 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 174E2D735C4; Thu, 18 May 2017 19:22:59 +0000 (UTC) (envelope-from demon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C249691C; Thu, 18 May 2017 19:22:58 +0000 (UTC) (envelope-from demon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IJMvZB087344; Thu, 18 May 2017 19:22:57 GMT (envelope-from demon@FreeBSD.org) Received: (from demon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IJMvV3087342; Thu, 18 May 2017 19:22:57 GMT (envelope-from demon@FreeBSD.org) Message-Id: <201705181922.v4IJMvV3087342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: demon set sender to demon@FreeBSD.org using -f From: Dmitry Sivachenko Date: Thu, 18 May 2017 19:22:57 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r441193 - in head/net/haproxy: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 19:22:59 -0000 Author: demon Date: Thu May 18 19:22:57 2017 New Revision: 441193 URL: https://svnweb.freebsd.org/changeset/ports/441193 Log: Add a patch from upstream to fix haproxy operations when dynamic dns resolvers are used. PR: 219379 Submitted by: jimp@pfsense.org Added: head/net/haproxy/files/patch-fix-dns (contents, props changed) Modified: head/net/haproxy/Makefile Modified: head/net/haproxy/Makefile ============================================================================== --- head/net/haproxy/Makefile Thu May 18 19:03:23 2017 (r441192) +++ head/net/haproxy/Makefile Thu May 18 19:22:57 2017 (r441193) @@ -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} Added: head/net/haproxy/files/patch-fix-dns ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/haproxy/files/patch-fix-dns Thu May 18 19:22:57 2017 (r441193) @@ -0,0 +1,33 @@ +From: Frédéric Lécaille +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; + }