From 22b8e731e254f7ef02cd7ac1536b31b9333abe72 Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Fri, 2 Dec 2016 11:19:18 +0000 Subject: Assert that rt_match() is always called at IPL_SOFTNET rather than calling splsoftnet() recursively. --- sys/net/route.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/net/route.c') diff --git a/sys/net/route.c b/sys/net/route.c index 0152054428a..662743bea2f 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.340 2016/11/29 10:22:30 jsg Exp $ */ +/* $OpenBSD: route.c,v 1.341 2016/12/02 11:19:17 mpi Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -237,9 +237,10 @@ struct rtentry * rt_match(struct sockaddr *dst, uint32_t *src, int flags, unsigned int tableid) { struct rtentry *rt0, *rt = NULL; - int s, error = 0; + int error = 0; + + splsoftassert(IPL_SOFTNET); - s = splsoftnet(); rt = rtable_match(tableid, dst, src); if (rt != NULL) { if ((rt->rt_flags & RTF_CLONING) && ISSET(flags, RT_RESOLVE)) { @@ -266,7 +267,6 @@ rt_match(struct sockaddr *dst, uint32_t *src, int flags, unsigned int tableid) rt->rt_use++; } else rtstat.rts_unreach++; - splx(s); return (rt); } -- cgit v1.2.3