svn commit: r203718 - stable/8/sys/netinet

Qing Li qingli at FreeBSD.org
Tue Feb 9 19:27:54 UTC 2010


Author: qingli
Date: Tue Feb  9 19:27:54 2010
New Revision: 203718
URL: http://svn.freebsd.org/changeset/base/203718

Log:
  MFC	r203401
  
  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.

Modified:
  stable/8/sys/netinet/in.c
Directory Properties:
  stable/8/sys/netinet/   (props changed)

Modified: stable/8/sys/netinet/in.c
==============================================================================
--- stable/8/sys/netinet/in.c	Tue Feb  9 19:13:45 2010	(r203717)
+++ stable/8/sys/netinet/in.c	Tue Feb  9 19:27:54 2010	(r203718)
@@ -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
 	 */


More information about the svn-src-stable mailing list