Skip to content

Commit f939981

Browse files
Weilong Chendavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a9517d0 commit f939981

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3884,6 +3884,9 @@ void bond_setup(struct net_device *bond_dev)
38843884
* capable
38853885
*/
38863886

3887+
/* Don't allow bond devices to change network namespaces. */
3888+
bond_dev->features |= NETIF_F_NETNS_LOCAL;
3889+
38873890
bond_dev->hw_features = BOND_VLAN_FEATURES |
38883891
NETIF_F_HW_VLAN_CTAG_TX |
38893892
NETIF_F_HW_VLAN_CTAG_RX |

0 commit comments

Comments
 (0)