svn commit: r226455 - stable/9/sys/netinet6

Qing Li qingli at FreeBSD.org
Mon Oct 17 03:35:25 UTC 2011


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)


More information about the svn-src-stable-9 mailing list