Message ID | 20210805082903.711396-4-razor@blackwall.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 9384eacd80f3da8d05fd17073eafd1f7fef80b26 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: bridge: fix recent ioctl changes | expand |
Context | Check | Description |
---|---|---|
netdev/apply | success | Patch already applied to net-next |
netdev/tree_selection | success | Clearly marked for net-next |
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);