diff options
author | 2006-06-19 08:14:06 +0000 | |
---|---|---|
committer | 2006-06-19 08:14:06 +0000 | |
commit | c725aeb436f7c13541ce489a96332b4009f0201b (patch) | |
tree | 38b7dc721e587310a13ac6141cb8722e5bec1801 | |
parent | add the new ASIC revs to the bge_majorrevs table. (diff) | |
download | wireguard-openbsd-c725aeb436f7c13541ce489a96332b4009f0201b.tar.xz wireguard-openbsd-c725aeb436f7c13541ce489a96332b4009f0201b.zip |
Unbreak the tree. The code to set and unset the RTF_MPATH bit on all multipath
routes did not carefully check if the route lookup succeded or not and so
rn_mpath_next(rn) blowed up because rn was NULL. Check if rnh_lookup succeded
before touching rn in anyway. OK norby@ initial diff by hshoexer@
-rw-r--r-- | sys/net/route.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index d96c72f2617..a58a41afeeb 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.80 2006/06/17 17:20:00 pascoe Exp $ */ +/* $OpenBSD: route.c,v 1.81 2006/06/19 08:14:06 claudio Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -891,9 +891,9 @@ makeroute: } #ifndef SMALL_KERNEL - if (rn_mpath_capable(rnh)) { - rn = rnh->rnh_lookup(info->rti_info[RTAX_DST], - info->rti_info[RTAX_NETMASK], rnh); + if (rn_mpath_capable(rnh) && + (rn = rnh->rnh_lookup(info->rti_info[RTAX_DST], + info->rti_info[RTAX_NETMASK], rnh)) != NULL) { if (rn_mpath_next(rn) == NULL) ((struct rtentry *)rn)->rt_flags &= ~RTF_MPATH; else |