From owner-svn-src-all@freebsd.org Sun Mar 17 09:31:10 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 7171015301E0; Sun, 17 Mar 2019 09:31:10 +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 12E1E6F0B5; Sun, 17 Mar 2019 09:31:10 +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 08BD17DAC; Sun, 17 Mar 2019 09:31:10 +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 x2H9V9do045298; Sun, 17 Mar 2019 09:31:09 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2H9V96d045297; Sun, 17 Mar 2019 09:31:09 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201903170931.x2H9V96d045297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sun, 17 Mar 2019 09:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345241 - head/libexec/rc X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/libexec/rc X-SVN-Commit-Revision: 345241 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 12E1E6F0B5 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.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] 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: Sun, 17 Mar 2019 09:31:10 -0000 Author: bz Date: Sun Mar 17 09:31:09 2019 New Revision: 345241 URL: https://svnweb.freebsd.org/changeset/base/345241 Log: Fix legacy IP autoconfiguration. It seems my subconcious plan in r345088 to not only prefer IPv6 autoconf but to also slowly deteriorate legacy IP auto-configuration was uncovered way too early. In case IPv6 is a thing yet ipv6_autoconfif was not true, we would not bring up the interface yet tell the follow-up DHCPv4 configuration in ifconfig_up() that we did. So unless you were doing SYNCDHCP or IPv6 you would not get legacy-IP DHCPv4 configuration. I see multiple problems here: (a) people not yet using IPv6 (obviously a problem), and (b) the dhclient startup script not running dhclient in that case despite configured to do so (needs to be investigated seperately). Reported by: Pawel Biernacki (pawel.biernacki gmail.com) Tested by: Pawel Biernacki Differential Revision: https://reviews.freebsd.org/D19488 Pointyhat to: bz (not sure if it is for breaking or for letting them notice it so easily) Modified: head/libexec/rc/network.subr Modified: head/libexec/rc/network.subr ============================================================================== --- head/libexec/rc/network.subr Sun Mar 17 06:05:19 2019 (r345240) +++ head/libexec/rc/network.subr Sun Mar 17 09:31:09 2019 (r345241) @@ -230,8 +230,7 @@ ifconfig_up() fi if ! noafif $1 && afexists inet6; then - ipv6_accept_rtadv_up $1 - _cfg=0 + ipv6_accept_rtadv_up $1 && _cfg=0 fi if dhcpif $1; then @@ -1205,7 +1204,9 @@ ipv6_accept_rtadv_up() if [ -x /sbin/rtsol ]; then /sbin/rtsol ${rtsol_flags} $1 fi + return 0 fi + return 1 } # ipv6_accept_rtadv_down if