Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334429
b: refs/heads/master
c: 55462cf
h: refs/heads/master
i:
  334427: 5eb03c8
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Oct 16, 2012
1 parent 5ac94a6 commit 0b55f2a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73b7656ce4e09eb137ee6f845a9e11a7f132df1c
refs/heads/master: 55462cf30ad9768fff6a6d36db21879146a39bdf
2 changes: 1 addition & 1 deletion trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
/* no need to lock since we're protected by rtnl_lock */
if (slave_dev->features & NETIF_F_VLAN_CHALLENGED) {
pr_debug("%s: NETIF_F_VLAN_CHALLENGED\n", slave_dev->name);
if (bond_vlan_used(bond)) {
if (vlan_uses_dev(bond_dev)) {
pr_err("%s: Error: cannot enslave VLAN challenged slave %s on VLAN enabled bond %s\n",
bond_dev->name, slave_dev->name, bond_dev->name);
return -EPERM;
Expand Down
9 changes: 8 additions & 1 deletion trunk/net/8021q/vlan_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,13 @@ EXPORT_SYMBOL(vlan_vids_del_by_dev);

bool vlan_uses_dev(const struct net_device *dev)
{
return rtnl_dereference(dev->vlan_info) ? true : false;
struct vlan_info *vlan_info;

ASSERT_RTNL();

vlan_info = rtnl_dereference(dev->vlan_info);
if (!vlan_info)
return false;
return vlan_info->grp.nr_vlan_devs ? true : false;
}
EXPORT_SYMBOL(vlan_uses_dev);

0 comments on commit 0b55f2a

Please sign in to comment.