team: do not allow to add VLAN challenged port when vlan is used
Reported-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
9b361c13ce
commit
2c33bb37cb
@@ -989,6 +989,13 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
|
|||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (port_dev->features & NETIF_F_VLAN_CHALLENGED &&
|
||||||
|
vlan_uses_dev(dev)) {
|
||||||
|
netdev_err(dev, "Device %s is VLAN challenged and team device has VLAN set up\n",
|
||||||
|
portname);
|
||||||
|
return -EPERM;
|
||||||
|
}
|
||||||
|
|
||||||
err = team_dev_type_check_change(dev, port_dev);
|
err = team_dev_type_check_change(dev, port_dev);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
Reference in New Issue
Block a user