diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-12-02 11:19:18 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-12-02 11:19:18 +0000 |
commit | 22b8e731e254f7ef02cd7ac1536b31b9333abe72 (patch) | |
tree | 11e423d29f7c405254c03040c13356790759e2a6 /sys/net | |
parent | d8ef1571a8948c66abdf5758c375ec2bd2a0f14c (diff) |
Assert that rt_match() is always called at IPL_SOFTNET rather than
calling splsoftnet() recursively.
Diffstat (limited to 'sys/net')
-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 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); } |