Author: qingli
Date: Tue Feb  2 20:38:30 2010
New Revision: 203401
URL: http://svn.freebsd.org/changeset/base/203401

Log:
  Some of the existing ppp and vpn related scripts create and set
  the IP addresses of the tunnel end points to the same value. In
  these cases the loopback route is not installed for the local
  end.
  
  Verified by:  avg
  MFC after:    5 days

Modified:
  head/sys/netinet/in.c

Modified: head/sys/netinet/in.c
==============================================================================
--- head/sys/netinet/in.c       Tue Feb  2 20:37:11 2010        (r203400)
+++ head/sys/netinet/in.c       Tue Feb  2 20:38:30 2010        (r203401)
@@ -921,6 +921,12 @@ in_ifinit(struct ifnet *ifp, struct in_i
        if (ia->ia_addr.sin_addr.s_addr == INADDR_ANY)
                return (0);
 
+       if (ifp->if_flags & IFF_POINTOPOINT) {
+               if (ia->ia_dstaddr.sin_addr.s_addr == 
ia->ia_addr.sin_addr.s_addr)
+                       return (0);
+       }
+
+
        /*
         * add a loopback route to self
         */
_______________________________________________
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