diff options
author | Jiri Pirko <jiri@resnulli.us> | 2012-08-22 23:26:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-24 13:46:40 -0400 |
commit | 2c33bb37cb69dc6d86d2ee8edd1d4814990a65fe (patch) | |
tree | e734cb62596529ce5ffaed7e07ba57c1ebce1be3 /drivers/net | |
parent | 9b361c13ceeae872161175d39f4798ee345ed10c (diff) |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/team/team.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index a5926c8584aa..b4f67b55ef79 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c | |||
@@ -989,6 +989,13 @@ static int team_port_add(struct team *team, struct net_device *port_dev) | |||
989 | return -EBUSY; | 989 | return -EBUSY; |
990 | } | 990 | } |
991 | 991 | ||
992 | if (port_dev->features & NETIF_F_VLAN_CHALLENGED && | ||
993 | vlan_uses_dev(dev)) { | ||
994 | netdev_err(dev, "Device %s is VLAN challenged and team device has VLAN set up\n", | ||
995 | portname); | ||
996 | return -EPERM; | ||
997 | } | ||
998 | |||
992 | err = team_dev_type_check_change(dev, port_dev); | 999 | err = team_dev_type_check_change(dev, port_dev); |
993 | if (err) | 1000 | if (err) |
994 | return err; | 1001 | return err; |