Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Oct 2011 01:56:43 +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-8@freebsd.org
Subject:   svn commit: r226485 - stable/8/sys/netinet6
Message-ID:  <201110180156.p9I1uhYc050890@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: qingli
Date: Tue Oct 18 01:56:43 2011
New Revision: 226485
URL: http://svn.freebsd.org/changeset/base/226485

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

Modified:
  stable/8/sys/netinet6/in6.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/netinet6/in6.c
==============================================================================
--- stable/8/sys/netinet6/in6.c	Mon Oct 17 23:36:29 2011	(r226484)
+++ stable/8/sys/netinet6/in6.c	Tue Oct 18 01:56:43 2011	(r226485)
@@ -1777,14 +1777,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?201110180156.p9I1uhYc050890>