diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/route.c | 4 | ||||
-rw-r--r-- | sys/netinet/ip_icmp.c | 12 | ||||
-rw-r--r-- | sys/netinet6/icmp6.c | 12 |
3 files changed, 13 insertions, 15 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index b8d44c5a152..5ea2ab94e2c 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.334 2016/11/08 10:39:32 mpi Exp $ */ +/* $OpenBSD: route.c,v 1.335 2016/11/09 09:04:48 mpi Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -1503,6 +1503,8 @@ rt_timer_queue_destroy(struct rttimer_queue *rtq) { struct rttimer *r; + splsoftassert(IPL_SOFTNET); + while ((r = TAILQ_FIRST(&rtq->rtq_head)) != NULL) { LIST_REMOVE(r, rtt_link); TAILQ_REMOVE(&rtq->rtq_head, r, rtt_next); diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index cdd60aa800e..959d32b200b 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_icmp.c,v 1.152 2016/08/22 15:37:23 mpi Exp $ */ +/* $OpenBSD: ip_icmp.c,v 1.153 2016/11/09 09:04:48 mpi Exp $ */ /* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */ /* @@ -1046,7 +1046,8 @@ void icmp_mtudisc_timeout(struct rtentry *rt, struct rttimer *r) { struct ifnet *ifp; - int s; + + splsoftassert(IPL_SOFTNET); ifp = if_get(rt->rt_ifidx); if (ifp == NULL) @@ -1058,7 +1059,6 @@ icmp_mtudisc_timeout(struct rtentry *rt, struct rttimer *r) sin = *satosin(rt_key(rt)); - s = splsoftnet(); rtdeletemsg(rt, ifp, r->rtt_tableid); /* Notify TCP layer of increased Path MTU estimate */ @@ -1066,7 +1066,6 @@ icmp_mtudisc_timeout(struct rtentry *rt, struct rttimer *r) if (ctlfunc) (*ctlfunc)(PRC_MTUINC, sintosa(&sin), r->rtt_tableid, NULL); - splx(s); } else { if ((rt->rt_rmx.rmx_locks & RTV_MTU) == 0) rt->rt_rmx.rmx_mtu = 0; @@ -1097,16 +1096,15 @@ void icmp_redirect_timeout(struct rtentry *rt, struct rttimer *r) { struct ifnet *ifp; - int s; + + splsoftassert(IPL_SOFTNET); ifp = if_get(rt->rt_ifidx); if (ifp == NULL) return; if ((rt->rt_flags & (RTF_DYNAMIC|RTF_HOST)) == (RTF_DYNAMIC|RTF_HOST)) { - s = splsoftnet(); rtdeletemsg(rt, ifp, r->rtt_tableid); - splx(s); } if_put(ifp); diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index c918004d750..179dde8fa55 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: icmp6.c,v 1.190 2016/08/24 09:38:29 mpi Exp $ */ +/* $OpenBSD: icmp6.c,v 1.191 2016/11/09 09:04:48 mpi Exp $ */ /* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */ /* @@ -1947,16 +1947,15 @@ void icmp6_mtudisc_timeout(struct rtentry *rt, struct rttimer *r) { struct ifnet *ifp; - int s; + + splsoftassert(IPL_SOFTNET); ifp = if_get(rt->rt_ifidx); if (ifp == NULL) return; if ((rt->rt_flags & (RTF_DYNAMIC|RTF_HOST)) == (RTF_DYNAMIC|RTF_HOST)) { - s = splsoftnet(); rtdeletemsg(rt, ifp, r->rtt_tableid); - splx(s); } else { if (!(rt->rt_rmx.rmx_locks & RTV_MTU)) rt->rt_rmx.rmx_mtu = 0; @@ -1969,16 +1968,15 @@ void icmp6_redirect_timeout(struct rtentry *rt, struct rttimer *r) { struct ifnet *ifp; - int s; + + splsoftassert(IPL_SOFTNET); ifp = if_get(rt->rt_ifidx); if (ifp == NULL) return; if ((rt->rt_flags & (RTF_DYNAMIC|RTF_HOST)) == (RTF_DYNAMIC|RTF_HOST)) { - s = splsoftnet(); rtdeletemsg(rt, ifp, r->rtt_tableid); - splx(s); } if_put(ifp); |