Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Oct 2011 21:46:37 +0000 (UTC)
From:      Qing Li <qingli@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r226239 - stable/8/sys/netinet
Message-ID:  <201110102146.p9ALkbFM084115@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 
 		/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110102146.p9ALkbFM084115>