Message ID | 20210805082903.711396-4-razor@blackwall.org |
---|---|
State | New |
Headers | show |
Series | net: bridge: fix recent ioctl changes | expand |
diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c index ff16326f5903..0e87237fd871 100644 --- a/net/core/dev_ioctl.c +++ b/net/core/dev_ioctl.c @@ -379,6 +379,8 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, void __user *data, case SIOCBRDELIF: if (!netif_device_present(dev)) return -ENODEV; + if (!netif_is_bridge_master(dev)) + return -EOPNOTSUPP; dev_hold(dev); rtnl_unlock(); err = br_ioctl_call(net, netdev_priv(dev), cmd, ifr, NULL);