summaryrefslogtreecommitdiff
path: root/sys/net/if_mpe.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-12-20 12:18:45 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-12-20 12:18:45 +0000
commit1c28691762cbdcc1d4da6d893746e26a7e9ad9e5 (patch)
tree9bcaa4685b2d45d511425323c6ffadf22434e3b7 /sys/net/if_mpe.c
parent211a527032a3f36170290f19a0aa65b9d855bcee (diff)
Kill recursive splsoftnet()/splx() dances in ioctl(2) path.
ok rzalamena@
Diffstat (limited to 'sys/net/if_mpe.c')
-rw-r--r--sys/net/if_mpe.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c
index d1c0ad054e0..b16f395bcde 100644
--- a/sys/net/if_mpe.c
+++ b/sys/net/if_mpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mpe.c,v 1.55 2016/09/21 07:41:49 mpi Exp $ */
+/* $OpenBSD: if_mpe.c,v 1.56 2016/12/20 12:18:44 mpi Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -270,7 +270,7 @@ mpeioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
struct mpe_softc *ifm;
struct ifreq *ifr;
struct shim_hdr shim;
- int s, error = 0;
+ int error = 0;
ifr = (struct ifreq *)data;
switch (cmd) {
@@ -320,7 +320,6 @@ mpeioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
if (error)
break;
ifm = ifp->if_softc;
- s = splsoftnet();
if (ifm->sc_smpls.smpls_label) {
/* remove old MPLS route */
rt_ifa_del(&ifm->sc_ifa, RTF_MPLS,
@@ -330,7 +329,6 @@ mpeioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
ifm->sc_smpls.smpls_label = shim.shim_label;
error = rt_ifa_add(&ifm->sc_ifa, RTF_MPLS,
smplstosa(&ifm->sc_smpls));
- splx(s);
if (error) {
ifm->sc_smpls.smpls_label = 0;
break;
@@ -341,10 +339,8 @@ mpeioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
ifm = ifp->if_softc;
if (ifr->ifr_rdomainid != ifp->if_rdomain) {
if (ifm->sc_smpls.smpls_label) {
- s = splsoftnet();
rt_ifa_add(&ifm->sc_ifa, RTF_MPLS,
smplstosa(&ifm->sc_smpls));
- splx(s);
}
}
/* return with ENOTTY so that the parent handler finishes */