Author: qingli
Date: Sun Oct 16 22:24:04 2011
New Revision: 226453
URL: http://svn.freebsd.org/changeset/base/226453

Log:
  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
  MFC after:    3 days

Modified:
  head/sys/netinet6/in6.c

Modified: head/sys/netinet6/in6.c
==============================================================================
--- head/sys/netinet6/in6.c     Sun Oct 16 22:18:08 2011        (r226452)
+++ head/sys/netinet6/in6.c     Sun Oct 16 22:24:04 2011        (r226453)
@@ -1860,14 +1860,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)
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to