]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Set default for so-reuseport to no for FreeBSD. It is enabled
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 5 Oct 2018 15:07:19 +0000 (15:07 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 5 Oct 2018 15:07:19 +0000 (15:07 +0000)
  by default for Linux and DragonFlyBSD.  The setting can
  be configured in unbound.conf to override the default.

git-svn-id: file:///svn/unbound/trunk@4932 be551aaa-1e26-0410-a405-d3ace91eadb9

config.h.in
configure
configure.ac
doc/Changelog
util/config_file.c

index 7ffb3c989b103dd57e1add2982a221a83ac29095..2f98f193c0622591551ecf696b7acd6539bbd637 100644 (file)
 /* 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
 
index 4f134fca0bcff9a5a510b635455e71c32fe05ff6..5c14d8767602d28d8aa55aadd92929f9959e5f49 100755 (executable)
--- a/configure
+++ b/configure
 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 :
index 772a1417a987ee75daf8defed41e4d5c64d22d7b..48bdb8fab6e458f47e643b6970eb6109bf98d5eb 100644 (file)
@@ -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 ]), 
index b82e06e2145e8000506db1e14ef07785fe39274a..6ec4c07dc45808efef281eb724cdf28f3aad8e36 100644 (file)
@@ -2,6 +2,9 @@
        - Squelch EADDRNOTAVAIL errors when the interface goes away,
          this omits 'can't assign requested address' errors unless
          verbosity is set to a high value.
+       - Set default for so-reuseport to no for FreeBSD.  It is enabled
+         by default for Linux and DragonFlyBSD.  The setting can 
+         be configured in unbound.conf to override the default.
 
 2 October 2018: Wouter
        - updated contrib/fastrpz.patch to apply for this version
index 2568af2eb5b54f754db5dcb2891355e3f4204ab8..e9c312ab0f54fe985e88f9e82dbf34275d5d417e 100644 (file)
@@ -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;