svn commit: r258260 - head/sys/netinet

Gleb Smirnoff glebius at FreeBSD.org
Sun Nov 17 15:14:07 UTC 2013


Author: glebius
Date: Sun Nov 17 15:14:07 2013
New Revision: 258260
URL: http://svnweb.freebsd.org/changeset/base/258260

Log:
  In r257692 I intentionally deleted code that handled P2P interfaces
  with equal addresses on both sides. It appeared that OpenVPN uses
  such configutations.
  
  Submitted by:	trociny

Modified:
  head/sys/netinet/in.c

Modified: head/sys/netinet/in.c
==============================================================================
--- head/sys/netinet/in.c	Sun Nov 17 15:12:03 2013	(r258259)
+++ head/sys/netinet/in.c	Sun Nov 17 15:14:07 2013	(r258260)
@@ -449,7 +449,9 @@ in_aifaddr_ioctl(u_long cmd, caddr_t dat
 	 * Add a loopback route to self.
 	 */
 	if (vhid == 0 && (ifp->if_flags & IFF_LOOPBACK) == 0 &&
-	    ia->ia_addr.sin_addr.s_addr != INADDR_ANY) {
+	    ia->ia_addr.sin_addr.s_addr != INADDR_ANY &&
+	    !((ifp->if_flags & IFF_POINTOPOINT) &&
+	     ia->ia_dstaddr.sin_addr.s_addr == ia->ia_addr.sin_addr.s_addr)) {
 		struct in_ifaddr *eia;
 
 		eia = in_localip_more(ia);


More information about the svn-src-head mailing list