summaryrefslogtreecommitdiff
path: root/sys/net/route.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2008-11-21 18:01:31 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2008-11-21 18:01:31 +0000
commit8e06c6f5dc2471f74afaba2d2165f15df7ccccb0 (patch)
tree360aefddde5c037a78d1da81fcde1cbb01aa9c25 /sys/net/route.c
parent070dd156775d8869751bd9b8b48fa3df30d11948 (diff)
Change rn_mpath_next() to be able to walk over the full multipath list
not only over routes of the same prio. This makes it possible to modify rt_mpath_matchgate() so that if only gateway is specified without a specific priority it will scan the full list and not only the first routes. This is also needed for upcoming link state tracking.
Diffstat (limited to 'sys/net/route.c')
-rw-r--r--sys/net/route.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index 74ee0fe4d47..f35317bbf7d 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.97 2008/09/10 14:01:23 blambert Exp $ */
+/* $OpenBSD: route.c,v 1.98 2008/11/21 18:01:30 claudio Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -771,7 +771,7 @@ rtrequest1(int req, struct rt_addrinfo *info, u_int8_t prio,
if (rn_mpath_capable(rnh)) {
if ((rn = rnh->rnh_lookup(info->rti_info[RTAX_DST],
info->rti_info[RTAX_NETMASK], rnh)) != NULL &&
- rn_mpath_next(rn) == NULL)
+ rn_mpath_next(rn, 0) == NULL)
((struct rtentry *)rn)->rt_flags &= ~RTF_MPATH;
}
#endif
@@ -887,7 +887,7 @@ makeroute:
(rn = rnh->rnh_lookup(info->rti_info[RTAX_DST],
info->rti_info[RTAX_NETMASK], rnh)) != NULL &&
(rn = rn_mpath_prio(rn, prio)) != NULL) {
- if (rn_mpath_next(rn) == NULL)
+ if (rn_mpath_next(rn, 0) == NULL)
((struct rtentry *)rn)->rt_flags &= ~RTF_MPATH;
else
((struct rtentry *)rn)->rt_flags |= RTF_MPATH;