not support media parameter, so just skip these ioctls. Do not
release a netlock that was not taken.
panic found and fix tested by Michael Graves; OK mvs@
-/* $OpenBSD: if_bridge.c,v 1.363 2022/01/04 06:32:39 yasuoka Exp $ */
+/* $OpenBSD: if_bridge.c,v 1.364 2022/08/07 00:57:43 bluhm Exp $ */
/*
* Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
/*
* bridge(4) data structure aren't protected by the NET_LOCK().
* Idealy it shouldn't be taken before calling `ifp->if_ioctl'
- * but we aren't there yet.
+ * but we aren't there yet. Media ioctl run without netlock.
*/
+ switch (cmd) {
+ case SIOCSIFMEDIA:
+ case SIOCGIFMEDIA:
+ return (ENOTTY);
+ }
NET_UNLOCK();
switch (cmd) {