Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Oct 2018 20:21:09 +0000 (UTC)
From:      =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r339291 - in vendor/unbound/dist: . util
Message-ID:  <201810102021.w9AKL9oD056430@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: des
Date: Wed Oct 10 20:21:09 2018
New Revision: 339291
URL: https://svnweb.freebsd.org/changeset/base/339291

Log:
  Merge upstream r4932: turn so-reuseport option off by default.

Modified:
  vendor/unbound/dist/config.h.in
  vendor/unbound/dist/configure
  vendor/unbound/dist/configure.ac
  vendor/unbound/dist/util/config_file.c

Modified: vendor/unbound/dist/config.h.in
==============================================================================
--- vendor/unbound/dist/config.h.in	Wed Oct 10 19:57:10 2018	(r339290)
+++ vendor/unbound/dist/config.h.in	Wed Oct 10 20:21:09 2018	(r339291)
@@ -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: vendor/unbound/dist/configure
==============================================================================
--- vendor/unbound/dist/configure	Wed Oct 10 19:57:10 2018	(r339290)
+++ vendor/unbound/dist/configure	Wed Oct 10 20:21:09 2018	(r339291)
@@ -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: vendor/unbound/dist/configure.ac
==============================================================================
--- vendor/unbound/dist/configure.ac	Wed Oct 10 19:57:10 2018	(r339290)
+++ vendor/unbound/dist/configure.ac	Wed Oct 10 20:21:09 2018	(r339291)
@@ -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: vendor/unbound/dist/util/config_file.c
==============================================================================
--- vendor/unbound/dist/util/config_file.c	Wed Oct 10 19:57:10 2018	(r339290)
+++ vendor/unbound/dist/util/config_file.c	Wed Oct 10 20:21:09 2018	(r339291)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810102021.w9AKL9oD056430>