From owner-svn-src-all@freebsd.org Wed Mar 13 17:00:16 2019 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 B7AAB1539F31; Wed, 13 Mar 2019 17:00:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E66C89A88; Wed, 13 Mar 2019 17:00:16 +0000 (UTC) (envelope-from bz@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 4DAF4D64C; Wed, 13 Mar 2019 17:00:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2DH0GoJ022978; Wed, 13 Mar 2019 17:00:16 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DH0GGY022977; Wed, 13 Mar 2019 17:00:16 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201903131700.x2DH0GGY022977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 13 Mar 2019 17:00:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345088 - head/libexec/rc X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/libexec/rc X-SVN-Commit-Revision: 345088 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5E66C89A88 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] 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: Wed, 13 Mar 2019 17:00:16 -0000 Author: bz Date: Wed Mar 13 17:00:15 2019 New Revision: 345088 URL: https://svnweb.freebsd.org/changeset/base/345088 Log: Enhance IPv6 autoconf startup. Before this change we would only run rtsol on an interface which was set to accept_rtadv and did not have rtsold enabled. This change removes the latter condition and always runs rtsol (rather than the deferred rtsold) to reduce the delay until we send the first RS. This change will also handle the accept_rtadv before dhcp hence starting IPv6 auto-configuration before IPV4 DHCP. This change is intended for FreeBSD 13 and later only and will not be MFCed. Reviewed by: hrs Differential Revision: https://reviews.freebsd.org/D19488 Modified: head/libexec/rc/network.subr Modified: head/libexec/rc/network.subr ============================================================================== --- head/libexec/rc/network.subr Wed Mar 13 15:18:14 2019 (r345087) +++ head/libexec/rc/network.subr Wed Mar 13 17:00:15 2019 (r345088) @@ -229,6 +229,11 @@ ifconfig_up() ${IFCONFIG_CMD} $1 up fi + if ! noafif $1 && afexists inet6; then + ipv6_accept_rtadv_up $1 + _cfg=0 + fi + if dhcpif $1; then if [ $_cfg -ne 0 ] ; then ${IFCONFIG_CMD} $1 up @@ -686,7 +691,6 @@ ipv6_up() ifalias ${_if} inet6 alias && _ret=0 ipv6_prefix_hostid_addr_common ${_if} alias && _ret=0 - ipv6_accept_rtadv_up ${_if} && _ret=0 return $_ret } @@ -1198,8 +1202,8 @@ ipv6_accept_rtadv_up() { if ipv6_autoconfif $1; then ${IFCONFIG_CMD} $1 inet6 accept_rtadv up - if ! checkyesno rtsold_enable; then - rtsol ${rtsol_flags} $1 + if [ -x /sbin/rtsol ]; then + /sbin/rtsol ${rtsol_flags} $1 fi fi }