Skip to content

Commit 99301ba

Browse files
Weilong Chendavem330
authored andcommitted
team: Don't allow team devices to change network namespaces.
Like bonding, team as netdevice doesn't cross netns boundaries. Team ports and team itself live in same netns. Signed-off-by: Weilong Chen <chenweilong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f939981 commit 99301ba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/team/team.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,6 +2034,10 @@ static void team_setup(struct net_device *dev)
20342034

20352035
dev->features |= NETIF_F_LLTX;
20362036
dev->features |= NETIF_F_GRO;
2037+
2038+
/* Don't allow team devices to change network namespaces. */
2039+
dev->features |= NETIF_F_NETNS_LOCAL;
2040+
20372041
dev->hw_features = TEAM_VLAN_FEATURES |
20382042
NETIF_F_HW_VLAN_CTAG_TX |
20392043
NETIF_F_HW_VLAN_CTAG_RX |

0 commit comments

Comments
 (0)