Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Aug 2011 04:31:20 +0000 (UTC)
From:      Qing Li <qingli@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r225163 - head/sys/net
Message-ID:  <201108250431.p7P4VK0E084699@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: qingli
Date: Thu Aug 25 04:31:20 2011
New Revision: 225163
URL: http://svn.freebsd.org/changeset/base/225163

Log:
  When the RADIX_MPATH kernel option is enabled, the RADIX_MPATH code tries
  to find the first route node of an ECMP chain before executing the route
  command. If the system has a default route, and the specific route argument
  to the command does not exist in the routing table, then the default route
  would be reached. The current code does not verify the reached node matches
  the given route argument, therefore erroneous removed the entry. This patch
  fixes that bug.
  
  Approved by:	re
  MFC after:	3 days

Modified:
  head/sys/net/radix_mpath.c

Modified: head/sys/net/radix_mpath.c
==============================================================================
--- head/sys/net/radix_mpath.c	Thu Aug 25 01:47:26 2011	(r225162)
+++ head/sys/net/radix_mpath.c	Thu Aug 25 04:31:20 2011	(r225163)
@@ -96,10 +96,7 @@ rt_mpath_matchgate(struct rtentry *rt, s
 {
 	struct radix_node *rn;
 
-	if (!rn_mpath_next((struct radix_node *)rt))
-		return rt;
-
-	if (!gate)
+	if (!gate || !rt->rt_gateway)
 		return NULL;
 
 	/* beyond here, we use rn as the master copy */



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