From owner-svn-src-all@freebsd.org Thu Nov 1 23:42:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BC0910DD200; Thu, 1 Nov 2018 23:42:37 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C1C7C6BE09; Thu, 1 Nov 2018 23:42:36 +0000 (UTC) (envelope-from des@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A196122BC6; Thu, 1 Nov 2018 23:42:36 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wA1NgauX079618; Thu, 1 Nov 2018 23:42:36 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wA1NgZPh079612; Thu, 1 Nov 2018 23:42:35 GMT (envelope-from des@FreeBSD.org) Message-Id: <201811012342.wA1NgZPh079612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Thu, 1 Nov 2018 23:42:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340037 - in head/contrib/unbound: . util X-SVN-Group: head X-SVN-Commit-Author: des X-SVN-Commit-Paths: in head/contrib/unbound: . util X-SVN-Commit-Revision: 340037 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Nov 2018 23:42:37 -0000 Author: des Date: Thu Nov 1 23:42:35 2018 New Revision: 340037 URL: https://svnweb.freebsd.org/changeset/base/340037 Log: Merge upstream r4932: turn so-reuseport option off by default. MFC after: 3 days Modified: head/contrib/unbound/config.h head/contrib/unbound/config.h.in head/contrib/unbound/configure head/contrib/unbound/configure.ac head/contrib/unbound/util/config_file.c Directory Properties: head/contrib/unbound/ (props changed) Modified: head/contrib/unbound/config.h ============================================================================== --- head/contrib/unbound/config.h Thu Nov 1 23:11:47 2018 (r340036) +++ head/contrib/unbound/config.h Thu Nov 1 23:42:35 2018 (r340037) @@ -664,6 +664,9 @@ /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void +/* if REUSEPORT is enabled by default */ +#define REUSEPORT_DEFAULT 0 + /* default rootkey location */ #define ROOT_ANCHOR_FILE "/var/unbound/root.key" Modified: head/contrib/unbound/config.h.in ============================================================================== --- head/contrib/unbound/config.h.in Thu Nov 1 23:11:47 2018 (r340036) +++ head/contrib/unbound/config.h.in Thu Nov 1 23:42:35 2018 (r340037) @@ -663,6 +663,9 @@ /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE +/* if REUSEPORT is enabled by default */ +#undef REUSEPORT_DEFAULT + /* default rootkey location */ #undef ROOT_ANCHOR_FILE Modified: head/contrib/unbound/configure ============================================================================== --- head/contrib/unbound/configure Thu Nov 1 23:11:47 2018 (r340036) +++ head/contrib/unbound/configure Thu Nov 1 23:42:35 2018 (r340037) @@ -15966,6 +15966,17 @@ fi done +# check if we can use SO_REUSEPORT +if echo "$host" | grep -i -e linux -e dragonfly >/dev/null; then + +$as_echo "#define REUSEPORT_DEFAULT 1" >>confdefs.h + +else + +$as_echo "#define REUSEPORT_DEFAULT 0" >>confdefs.h + +fi + # set memory allocation checking if requested # Check whether --enable-alloc-checks was given. if test "${enable_alloc_checks+set}" = set; then : Modified: head/contrib/unbound/configure.ac ============================================================================== --- head/contrib/unbound/configure.ac Thu Nov 1 23:11:47 2018 (r340036) +++ head/contrib/unbound/configure.ac Thu Nov 1 23:42:35 2018 (r340037) @@ -461,6 +461,13 @@ ACX_CHECK_NONBLOCKING_BROKEN ACX_MKDIR_ONE_ARG AC_CHECK_FUNCS([strptime],[AC_CHECK_STRPTIME_WORKS],[AC_LIBOBJ([strptime])]) +# check if we can use SO_REUSEPORT +if echo "$host" | grep -i -e linux -e dragonfly >/dev/null; then + AC_DEFINE(REUSEPORT_DEFAULT, 1, [if REUSEPORT is enabled by default]) +else + AC_DEFINE(REUSEPORT_DEFAULT, 0, [if REUSEPORT is enabled by default]) +fi + # set memory allocation checking if requested AC_ARG_ENABLE(alloc-checks, AC_HELP_STRING([--enable-alloc-checks], [ enable to memory allocation statistics, for debug purposes ]), Modified: head/contrib/unbound/util/config_file.c ============================================================================== --- head/contrib/unbound/util/config_file.c Thu Nov 1 23:11:47 2018 (r340036) +++ head/contrib/unbound/util/config_file.c Thu Nov 1 23:42:35 2018 (r340037) @@ -177,7 +177,7 @@ config_create(void) cfg->if_automatic = 0; cfg->so_rcvbuf = 0; cfg->so_sndbuf = 0; - cfg->so_reuseport = 1; + cfg->so_reuseport = REUSEPORT_DEFAULT; cfg->ip_transparent = 0; cfg->ip_freebind = 0; cfg->num_ifs = 0;