Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Mar 2019 09:31:09 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r345241 - head/libexec/rc
Message-ID:  <201903170931.x2H9V96d045297@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



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