summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-12-19 15:49:29 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-12-19 15:49:29 +0000
commit269442b15979d5e3704f009357eae8bddc18c9c6 (patch)
tree75a289958cc8f5df6170d40659574facbb5d5b7b
parent9fd76b4a5892706fc9ce4348e668779d29e1d235 (diff)
Assert that IPL_SOFTNET is needed rather than calling splsoftnet()
recursively. ok bluhm@
-rw-r--r--sys/net/if_bridge.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index af5b7b2e779..f099b1915ee 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bridge.c,v 1.289 2016/11/21 08:27:59 reyk Exp $ */
+/* $OpenBSD: if_bridge.c,v 1.290 2016/12/19 15:49:28 mpi Exp $ */
/*
* Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
@@ -1393,7 +1393,7 @@ bridge_ipsec(struct bridge_softc *sc, struct ifnet *ifp,
struct tdb *tdb;
u_int32_t spi;
u_int16_t cpi;
- int error, off, s;
+ int error, off;
u_int8_t proto = 0;
struct ip *ip;
#ifdef INET6
@@ -1478,7 +1478,7 @@ bridge_ipsec(struct bridge_softc *sc, struct ifnet *ifp,
if (proto == 0)
goto skiplookup;
- s = splsoftnet();
+ splsoftassert(IPL_SOFTNET);
tdb = gettdb(ifp->if_rdomain, spi, &dst, proto);
if (tdb != NULL && (tdb->tdb_flags & TDBF_INVALID) == 0 &&
@@ -1494,10 +1494,8 @@ bridge_ipsec(struct bridge_softc *sc, struct ifnet *ifp,
}
(*(tdb->tdb_xform->xf_input))(m, tdb, hlen, off);
- splx(s);
return (1);
} else {
- splx(s);
skiplookup:
/* XXX do an input policy lookup */
return (0);