diff options
author | 2008-12-29 20:37:26 +0000 | |
---|---|---|
committer | 2008-12-29 20:37:26 +0000 | |
commit | e3c78376ed03fb762ed56701f4a924f16f60c8e3 (patch) | |
tree | 45e74fa2a7943440558f1129eb3bc93cfbb61d43 | |
parent | Some forms of inode corruption can make remsize and thus isize go (diff) | |
download | wireguard-openbsd-e3c78376ed03fb762ed56701f4a924f16f60c8e3.tar.xz wireguard-openbsd-e3c78376ed03fb762ed56701f4a924f16f60c8e3.zip |
Use rn_mpath_next() in rtalloc_mpath() to figure out if the next route
belongs to the same multipath group instead of own wrong check which failed
to look at the priority.
Found and diff tested by gollo@
-rw-r--r-- | sys/net/radix_mpath.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/radix_mpath.c b/sys/net/radix_mpath.c index 933a04af505..d2be140a598 100644 --- a/sys/net/radix_mpath.c +++ b/sys/net/radix_mpath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radix_mpath.c,v 1.13 2008/11/24 12:53:53 claudio Exp $ */ +/* $OpenBSD: radix_mpath.c,v 1.14 2008/12/29 20:37:26 claudio Exp $ */ /* $KAME: radix_mpath.c,v 1.13 2002/10/28 21:05:59 itojun Exp $ */ /* @@ -395,7 +395,7 @@ rtalloc_mpath(struct route *ro, u_int32_t *srcaddrp, u_int tableid) threshold = 1 + (0xffff / npaths); while (hash > threshold && rn) { /* stay within the multipath routes */ - if (rn->rn_dupedkey && rn->rn_mask != rn->rn_dupedkey->rn_mask) + if (rn_mpath_next(rn, 0) == NULL) break; rn = rn->rn_dupedkey; hash -= threshold; |