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

Qing Li qingli at FreeBSD.org
Mon Oct 10 21:46:37 UTC 2011


Author: qingli
Date: Mon Oct 10 21:46:37 2011
New Revision: 226239
URL: http://svn.freebsd.org/changeset/base/226239

Log:
  MFC 225223
  
  When an interface address route is removed from the system, another
  route with the same prefix is searched for as a replacement. The
  current code did not bypass routes that have non-operational
  interfaces. This patch fixes that bug and will find a replacement
  route with an active interface.
  
  PR:		kern/159603
  Submitted by:	pluknet, ambrisko at ambrisko dot com
  Reviewed by:	discussed on net@

Modified:
  stable/8/sys/netinet/in.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/netinet/in.c
==============================================================================
--- stable/8/sys/netinet/in.c	Mon Oct 10 21:43:53 2011	(r226238)
+++ stable/8/sys/netinet/in.c	Mon Oct 10 21:46:37 2011	(r226239)
@@ -1166,7 +1166,8 @@ in_scrubprefix(struct in_ifaddr *target,
 			p.s_addr &= ia->ia_sockmask.sin_addr.s_addr;
 		}
 
-		if (prefix.s_addr != p.s_addr)
+		if ((prefix.s_addr != p.s_addr) ||
+		    !(ia->ia_ifp->if_flags & IFF_UP))
 			continue;
 
 		/*


More information about the svn-src-stable-8 mailing list