Author: qingli
Date: Wed Oct  5 16:27:11 2011
New Revision: 226040
URL: http://svn.freebsd.org/changeset/base/226040

Log:
  The IFA_RTSELF instead of the IFA_ROUTE flag should be checked to
  determine if a loopback route should be installed for an interface
  IPv6 address. Another condition is the address must not belong to a
  looopback interface.
  
  Reviewed by:  hrs
  MFC after:    3 days

Modified:
  head/sys/netinet6/in6.c

Modified: head/sys/netinet6/in6.c
==============================================================================
--- head/sys/netinet6/in6.c     Wed Oct  5 16:03:47 2011        (r226039)
+++ head/sys/netinet6/in6.c     Wed Oct  5 16:27:11 2011        (r226040)
@@ -1810,9 +1810,9 @@ in6_ifinit(struct ifnet *ifp, struct in6
        /*
         * add a loopback route to self
         */
-       if (!(ia->ia_flags & IFA_ROUTE)
+       if (!(ia->ia_flags & IFA_RTSELF)
            && (V_nd6_useloopback
-               || (ifp->if_flags & IFF_LOOPBACK))) {
+               && !(ifp->if_flags & IFF_LOOPBACK))) {
                error = ifa_add_loopback_route((struct ifaddr *)ia,
                                       (struct sockaddr *)&ia->ia_addr);
                if (error == 0)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to