summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-03-27 23:41:05 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-03-27 23:41:05 +0000
commitfd563f3d2c7faffdce75a52899aebcecf60af74d (patch)
tree937ee5d67003fe42de55a2934c4d59b631e56f03
parent8a7c8b78fd6d29290c2749f4a8eb0ce436fabcb9 (diff)
wrap if_down() in splimp; tholo ran into splassert, miod tholo ok
-rw-r--r--sys/net/if_vlan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index e49db5c9b99..43fb15b1fb9 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vlan.c,v 1.45 2004/02/12 18:07:29 henning Exp $ */
+/* $OpenBSD: if_vlan.c,v 1.46 2004/03/27 23:41:04 deraadt Exp $ */
/*
* Copyright 1998 Massachusetts Institute of Technology
*
@@ -551,7 +551,7 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
struct ifreq *ifr;
struct ifvlan *ifv;
struct vlanreq vlr;
- int error = 0, p_mtu = 0;
+ int error = 0, p_mtu = 0, s;
ifr = (struct ifreq *)data;
ifa = (struct ifaddr *)data;
@@ -608,9 +608,11 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
if ((error = copyin(ifr->ifr_data, &vlr, sizeof vlr)))
break;
if (vlr.vlr_parent[0] == '\0') {
+ s = splimp();
vlan_unconfig(ifp);
if_down(ifp);
ifp->if_flags &= ~(IFF_UP|IFF_RUNNING);
+ splx(s);
break;
}
if (vlr.vlr_tag != EVL_VLANOFTAG(vlr.vlr_tag)) {