summaryrefslogtreecommitdiff
path: root/sys/net/route.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2008-07-28 13:25:11 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2008-07-28 13:25:11 +0000
commita6e91a1a857188b6ec1d672eeaf01ef77ca14c64 (patch)
treee0120b13ff68ad8602596ee3f5829fcbfe4931a3 /sys/net/route.c
parent0d03d12e266b03fdf87a9c254e5574f71ddb6a13 (diff)
Fix the tracking of RTF_MPATH. Until now the magic happend on the first route
and not on the routes with the right prio. So pick up the correct route by calling rn_mpath_prio() first. OK henning@
Diffstat (limited to 'sys/net/route.c')
-rw-r--r--sys/net/route.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index 139c48eef38..cd73b910fe3 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.93 2008/06/08 19:12:28 claudio Exp $ */
+/* $OpenBSD: route.c,v 1.94 2008/07/28 13:25:10 claudio Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -885,7 +885,8 @@ makeroute:
#ifndef SMALL_KERNEL
if (rn_mpath_capable(rnh) &&
(rn = rnh->rnh_lookup(info->rti_info[RTAX_DST],
- info->rti_info[RTAX_NETMASK], rnh)) != NULL) {
+ info->rti_info[RTAX_NETMASK], rnh)) != NULL &&
+ (rn = rn_mpath_prio(rn, prio)) != NULL) {
if (rn_mpath_next(rn) == NULL)
((struct rtentry *)rn)->rt_flags &= ~RTF_MPATH;
else