summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2000-04-10 13:34:55 +0000
committerJason Wright <jason@cvs.openbsd.org>2000-04-10 13:34:55 +0000
commit7930c4359d043923c431d6086e690b4eff2736fa (patch)
tree16e1800522ef68a672478d1e60eea00fa5958688
parent48da8c178082f937f403f8f3186fe11363a42bdf (diff)
don't return directly from bridge_ioctl without splx() on invalid enc
interfaces; modified version of patch from Armin Wolfermann <armin@wolfermann.org>.
-rw-r--r--sys/net/if_bridge.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 4879cf27a8d..0bc9a86973e 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bridge.c,v 1.28 2000/02/28 23:41:28 jason Exp $ */
+/* $OpenBSD: if_bridge.c,v 1.29 2000/04/10 13:34:54 jason Exp $ */
/*
* Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
@@ -302,13 +302,15 @@ bridge_ioctl(ifp, cmd, data)
break;
}
}
- else if (ifs->if_type == IFT_ENC) {
#if NENC > 0
+ else if (ifs->if_type == IFT_ENC) {
/* Can't bind enc0 to a bridge */
- if (ifs->if_softc == &encif[0])
- return EINVAL;
-#endif /* NENC */
+ if (ifs->if_softc == &encif[0]) {
+ error = EINVAL;
+ break;
+ }
}
+#endif /* NENC */
else {
error = EINVAL;
break;