diff options
author | Qing Li <qingli@FreeBSD.org> | 2011-08-25 04:31:20 +0000 |
---|---|---|
committer | Qing Li <qingli@FreeBSD.org> | 2011-08-25 04:31:20 +0000 |
commit | fc96aabef121a95421141b9fbf285d39393efe29 (patch) | |
tree | 8929f307abdd5394a7236f61f338c2f2f17d879f /sys/net/radix_mpath.c | |
parent | 4969b96e574818cfda2d2335c927e16449b069d1 (diff) |
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
Notes
Notes:
svn path=/head/; revision=225163
Diffstat (limited to 'sys/net/radix_mpath.c')
-rw-r--r-- | sys/net/radix_mpath.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/net/radix_mpath.c b/sys/net/radix_mpath.c index ea84e5ce2282..ee7826f6e3e9 100644 --- a/sys/net/radix_mpath.c +++ b/sys/net/radix_mpath.c @@ -96,10 +96,7 @@ rt_mpath_matchgate(struct rtentry *rt, struct sockaddr *gate) { 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 */ |