Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Oct 2011 03:35:24 +0000 (UTC)
From:      Qing Li <qingli@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r226455 - stable/9/sys/netinet6
Message-ID:  <201110170335.p9H3ZOsT092946@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: qingli
Date: Mon Oct 17 03:35:24 2011
New Revision: 226455
URL: http://svn.freebsd.org/changeset/base/226455

Log:
  MFC 226453
  
  The code change made in r226040 was incomplete and resulted in
  routes such as fe80::1%lo0 no being installed. This patch completes
  the original intended fix.
  
  Reviewed by:	hrs. bz
  Approved by:	re (ken)

Modified:
  stable/9/sys/netinet6/in6.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/netinet6/in6.c
==============================================================================
--- stable/9/sys/netinet6/in6.c	Mon Oct 17 00:05:31 2011	(r226454)
+++ stable/9/sys/netinet6/in6.c	Mon Oct 17 03:35:24 2011	(r226455)
@@ -1805,14 +1805,17 @@ in6_ifinit(struct ifnet *ifp, struct in6
 		if (error != 0)
 			return (error);
 		ia->ia_flags |= IFA_ROUTE;
+		/*
+		 * Handle the case for ::1 .
+		 */
+		if (ifp->if_flags & IFF_LOOPBACK)
+			ia->ia_flags |= IFA_RTSELF;
 	}
 
 	/*
 	 * add a loopback route to self
 	 */
-	if (!(ia->ia_flags & IFA_RTSELF)
-	    && (V_nd6_useloopback
-		&& !(ifp->if_flags & IFF_LOOPBACK))) {
+	if (!(ia->ia_flags & IFA_RTSELF) && V_nd6_useloopback) {
 		error = ifa_add_loopback_route((struct ifaddr *)ia,
 				       (struct sockaddr *)&ia->ia_addr);
 		if (error == 0)



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