summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2000-05-21 22:19:08 +0000
committerNiels Provos <provos@cvs.openbsd.org>2000-05-21 22:19:08 +0000
commitb1099da884b869f234c637ad1c515f620dedac2f (patch)
tree8426e3ff03827507b8ea63f0bbae992a860bee50 /sys/net
parentc3585e16cb357a989ba29b11789dbf36764a6834 (diff)
deleting some routes created by imcp redirects could result in panic
fix from NetBSD: Delay clearing of RTF_UP until after deleting rt_gwroute.
Diffstat (limited to 'sys/net')
-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 edbc55662fe..2d9f79bf6b1 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.18 2000/03/23 16:37:52 art Exp $ */
+/* $OpenBSD: route.c,v 1.19 2000/05/21 22:19:07 provos Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -343,7 +343,7 @@ rtredirect(dst, gateway, netmask, flags, src, rtp)
goto done;
/*
* Create a new entry if we just got back a wildcard entry
- * or the the lookup failed. This is necessary for hosts
+ * or the lookup failed. This is necessary for hosts
* which use routing redirects generated by smart gateways
* to dynamically build the routing tables.
*/
@@ -498,11 +498,11 @@ rtrequest(req, dst, gateway, netmask, flags, ret_nrt)
if (rn->rn_flags & (RNF_ACTIVE | RNF_ROOT))
panic ("rtrequest delete");
rt = (struct rtentry *)rn;
- rt->rt_flags &= ~RTF_UP;
if (rt->rt_gwroute) {
rt = rt->rt_gwroute; RTFREE(rt);
(rt = (struct rtentry *)rn)->rt_gwroute = NULL;
}
+ rt->rt_flags &= ~RTF_UP;
if ((ifa = rt->rt_ifa) && ifa->ifa_rtrequest)
ifa->ifa_rtrequest(RTM_DELETE, rt, SA(NULL));
rttrash++;