Commit 99301ba11cb72f68f4e43e5778106035bd6965c4
Committed by
David S. Miller
1 parent
f939981492
Exists in
master
and in
16 other branches
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>
Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff
drivers/net/team/team.c
... | ... | @@ -2034,6 +2034,10 @@ |
2034 | 2034 | |
2035 | 2035 | dev->features |= NETIF_F_LLTX; |
2036 | 2036 | dev->features |= NETIF_F_GRO; |
2037 | + | |
2038 | + /* Don't allow team devices to change network namespaces. */ | |
2039 | + dev->features |= NETIF_F_NETNS_LOCAL; | |
2040 | + | |
2037 | 2041 | dev->hw_features = TEAM_VLAN_FEATURES | |
2038 | 2042 | NETIF_F_HW_VLAN_CTAG_TX | |
2039 | 2043 | NETIF_F_HW_VLAN_CTAG_RX | |