diff options
author | Peter Hessler <phessler@cvs.openbsd.org> | 2017-01-19 04:06:27 +0000 |
---|---|---|
committer | Peter Hessler <phessler@cvs.openbsd.org> | 2017-01-19 04:06:27 +0000 |
commit | 8f3b48703713448d3f39a5b2f2ff4a085d0bb868 (patch) | |
tree | 5610b29d240afff4b75ec2af17267a0270ea130e /sys/net/route.c | |
parent | 3d48d49758ecf9802006400988822d27ae760c54 (diff) |
remove the BFD flag on a route *before* we actually delete the route
should fix a panic reported by Hrvoje Popovski
Diffstat (limited to 'sys/net/route.c')
-rw-r--r-- | sys/net/route.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index 58076e56182..66df750353a 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.345 2016/12/19 08:36:49 mpi Exp $ */ +/* $OpenBSD: route.c,v 1.346 2017/01/19 04:06:26 phessler Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -883,6 +883,11 @@ rtrequest_delete(struct rt_addrinfo *info, u_int8_t prio, struct ifnet *ifp, } #endif +#ifdef BFD + if (ISSET(rt->rt_flags, RTF_BFD)) + bfdclear(rt); +#endif + error = rtable_delete(tableid, info->rti_info[RTAX_DST], info->rti_info[RTAX_NETMASK], rt); if (error != 0) { @@ -890,11 +895,6 @@ rtrequest_delete(struct rt_addrinfo *info, u_int8_t prio, struct ifnet *ifp, return (ESRCH); } -#ifdef BFD - if (ISSET(rt->rt_flags, RTF_BFD)) - bfdclear(rt); -#endif - /* Release next hop cache before flushing cloned entries. */ rt_putgwroute(rt); |