diff options
author | qingli <qingli@FreeBSD.org> | 2011-08-25 04:31:20 +0000 |
---|---|---|
committer | qingli <qingli@FreeBSD.org> | 2011-08-25 04:31:20 +0000 |
commit | 631a8abdff140aaa997d795f570b6c5e78f34991 (patch) | |
tree | 8929f307abdd5394a7236f61f338c2f2f17d879f | |
parent | 173bc8ca15a262be1199b83297414d44fa3d0a56 (diff) | |
download | FreeBSD-src-631a8abdff140aaa997d795f570b6c5e78f34991.zip FreeBSD-src-631a8abdff140aaa997d795f570b6c5e78f34991.tar.gz |
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
-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 ea84e5c..ee7826f 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 */ |