summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2017-05-15 12:57:42 +0000
committermpi <mpi@openbsd.org>2017-05-15 12:57:42 +0000
commit1d3e135bf16619a3de412e3bd23910dea0081bcb (patch)
treea250f8662958d16b0b07843e403709283bdcc502
parentEnable the NET_LOCK(), take 3. (diff)
downloadwireguard-openbsd-1d3e135bf16619a3de412e3bd23910dea0081bcb.tar.xz
wireguard-openbsd-1d3e135bf16619a3de412e3bd23910dea0081bcb.zip
bridge_ioctl() doesn't need to call splnet().
All interface ioctl()s are executed with the NET_LOCK() held, which protects all soft states of the network stack. IPL_NET is only needed in drivers dealing with hardware and by extension the wireless stack.
-rw-r--r--sys/net/if_bridge.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 377f6f5d074..cf6f4325f8a 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bridge.c,v 1.295 2017/05/12 22:43:21 bluhm Exp $ */
+/* $OpenBSD: if_bridge.c,v 1.296 2017/05/15 12:57:42 mpi Exp $ */
/*
* Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
@@ -266,9 +266,8 @@ bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
struct bridge_iflist *p;
struct bstp_port *bp;
struct bstp_state *bs = sc->sc_stp;
- int error = 0, s;
+ int error = 0;
- s = splnet();
switch (cmd) {
case SIOCBRDGADD:
/* bridge(4) does not distinguish between routing/forwarding ports */
@@ -569,7 +568,6 @@ bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
if (!error)
error = bstp_ioctl(ifp, cmd, data);
- splx(s);
return (error);
}