summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorWeilong Chen <chenweilong@huawei.com>2014-01-22 17:16:30 +0800
committerDavid S. Miller <davem@davemloft.net>2014-01-22 21:57:17 -0800
commitf9399814927ad9bb995a6e109c2a5f9d8a848209 (patch)
tree9a89a64b08711652ba91e8caeac619d8d308e92b /drivers/net
parenta9517d0f43832d787a4a0348163d659641bfd83c (diff)
downloadlinux-f9399814927ad9bb995a6e109c2a5f9d8a848209.tar.bz2
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 <chenweilong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bonding/bond_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 4a8ccce3315a..f9e0c8bbfa41 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 |