svn commit: r203401 - head/sys/netinet
Qing Li
qingli at FreeBSD.org
Tue Feb 2 20:38:31 UTC 2010
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
*/
More information about the svn-src-head
mailing list