From: Weilong Chen Date: Wed, 22 Jan 2014 09:16:30 +0000 (+0800) Subject: bonding: Don't allow bond devices to change network namespaces. X-Git-Tag: v3.14-rc1~94^2~22 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=f9399814927ad9bb995a6e109c2a5f9d8a848209;p=~emulex%2Finfiniband.git bonding: Don't allow bond devices to change network namespaces. Like bridge, bonding as netdevice doesn't cross netns boundaries. Bonding ports and bonding itself live in same netns. Signed-off-by: Weilong Chen Signed-off-by: David S. Miller --- diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 4a8ccce3315..f9e0c8bbfa4 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3884,6 +3884,9 @@ void bond_setup(struct net_device *bond_dev) * capable */ + /* Don't allow bond devices to change network namespaces. */ + bond_dev->features |= NETIF_F_NETNS_LOCAL; + bond_dev->hw_features = BOND_VLAN_FEATURES | NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX |