From owner-svn-src-stable@freebsd.org Wed Nov 7 16:22:21 2018 Return-Path: Delivered-To: svn-src-stable@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 EFE361129AB2; Wed, 7 Nov 2018 16:22:20 +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 7CC936F33E; Wed, 7 Nov 2018 16:22:20 +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 5F49418061; Wed, 7 Nov 2018 16:22:20 +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 wA7GMKTb081386; Wed, 7 Nov 2018 16:22:20 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wA7GMIIb081379; Wed, 7 Nov 2018 16:22:18 GMT (envelope-from des@FreeBSD.org) Message-Id: <201811071622.wA7GMIIb081379@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: Wed, 7 Nov 2018 16:22:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r340219 - in stable/12: contrib/unbound contrib/unbound/util libexec/rc libexec/rc/rc.d X-SVN-Group: stable-12 X-SVN-Commit-Author: des X-SVN-Commit-Paths: in stable/12: contrib/unbound contrib/unbound/util libexec/rc libexec/rc/rc.d X-SVN-Commit-Revision: 340219 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7CC936F33E X-Spamd-Result: default: False [-106.84 / 200.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; ALLOW_DOMAIN_WHITELIST(-100.00)[FreeBSD.org]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; DMARC_NA(0.00)[FreeBSD.org]; RCVD_COUNT_THREE(0.00)[4]; MX_GOOD(-0.01)[cached: mx1.FreeBSD.org]; NEURAL_HAM_SHORT(-1.00)[-1.000,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; IP_SCORE(-3.73)[ip: (-9.91), ipnet: 2610:1c1:1::/48(-4.90), asn: 11403(-3.75), country: US(-0.09)] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2018 16:22:21 -0000 Author: des Date: Wed Nov 7 16:22:18 2018 New Revision: 340219 URL: https://svnweb.freebsd.org/changeset/base/340219 Log: MFH (r339812): add default value for local_unbound_tls MFH (r339995): run unbound-anchor if root.key is empty (PR 232555) MFH (r340037): turn off so-reuseport by default Approved by: re (gjb) Modified: stable/12/contrib/unbound/config.h stable/12/contrib/unbound/config.h.in stable/12/contrib/unbound/configure stable/12/contrib/unbound/configure.ac stable/12/contrib/unbound/util/config_file.c stable/12/libexec/rc/rc.conf stable/12/libexec/rc/rc.d/local_unbound Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/unbound/config.h ============================================================================== --- stable/12/contrib/unbound/config.h Wed Nov 7 15:04:41 2018 (r340218) +++ stable/12/contrib/unbound/config.h Wed Nov 7 16:22:18 2018 (r340219) @@ -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: stable/12/contrib/unbound/config.h.in ============================================================================== --- stable/12/contrib/unbound/config.h.in Wed Nov 7 15:04:41 2018 (r340218) +++ stable/12/contrib/unbound/config.h.in Wed Nov 7 16:22:18 2018 (r340219) @@ -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: stable/12/contrib/unbound/configure ============================================================================== --- stable/12/contrib/unbound/configure Wed Nov 7 15:04:41 2018 (r340218) +++ stable/12/contrib/unbound/configure Wed Nov 7 16:22:18 2018 (r340219) @@ -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: stable/12/contrib/unbound/configure.ac ============================================================================== --- stable/12/contrib/unbound/configure.ac Wed Nov 7 15:04:41 2018 (r340218) +++ stable/12/contrib/unbound/configure.ac Wed Nov 7 16:22:18 2018 (r340219) @@ -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: stable/12/contrib/unbound/util/config_file.c ============================================================================== --- stable/12/contrib/unbound/util/config_file.c Wed Nov 7 15:04:41 2018 (r340218) +++ stable/12/contrib/unbound/util/config_file.c Wed Nov 7 16:22:18 2018 (r340219) @@ -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; Modified: stable/12/libexec/rc/rc.conf ============================================================================== --- stable/12/libexec/rc/rc.conf Wed Nov 7 15:04:41 2018 (r340218) +++ stable/12/libexec/rc/rc.conf Wed Nov 7 16:22:18 2018 (r340219) @@ -283,8 +283,9 @@ hastd_enable="NO" # Run the HAST daemon (YES/NO). hastd_program="/sbin/hastd" # path to hastd, if you want a different one. hastd_flags="" # Optional flags to hastd. ctld_enable="NO" # CAM Target Layer / iSCSI target daemon. -local_unbound_enable="NO" # local caching resolver -blacklistd_enable="NO" # Run blacklistd daemon (YES/NO). +local_unbound_enable="NO" # Local caching resolver +local_unbound_tls="NO" # Use DNS over TLS +blacklistd_enable="NO" # Run blacklistd daemon (YES/NO). blacklistd_flags="" # Optional flags for blacklistd(8). resolv_enable="YES" # Enable resolv / resolvconf Modified: stable/12/libexec/rc/rc.d/local_unbound ============================================================================== --- stable/12/libexec/rc/rc.d/local_unbound Wed Nov 7 15:04:41 2018 (r340218) +++ stable/12/libexec/rc/rc.d/local_unbound Wed Nov 7 16:22:18 2018 (r340219) @@ -92,7 +92,7 @@ local_unbound_prestart() fi # Retrieve DNSSEC root key - if [ ! -f ${local_unbound_anchor} ] ; then + if [ ! -s ${local_unbound_anchor} ] ; then run_rc_command anchor fi }