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
This commit is contained in:
Qing Li 2010-02-02 20:38:30 +00:00
parent 9ba42503a5
commit d577d18a00

View File

@ -921,6 +921,12 @@ in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in *sin,
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
*/