[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1390446442-12768-1-git-send-email-chenweilong@huawei.com>
Date: Thu, 23 Jan 2014 11:07:22 +0800
From: Chen Weilong <chenweilong@...wei.com>
To: <jiri@...nulli.us>, <davem@...emloft.net>
CC: <netdev@...r.kernel.org>
Subject: [PATCH] team: Don't allow team devices to change network namespaces.
From: Weilong Chen <chenweilong@...wei.com>
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@...wei.com>
---
drivers/net/team/team.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index dff24e3..2840742 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -2034,6 +2034,10 @@ static void team_setup(struct net_device *dev)
dev->features |= NETIF_F_LLTX;
dev->features |= NETIF_F_GRO;
+
+ /* Don't allow team devices to change network namespaces. */
+ dev->features |= NETIF_F_NETNS_LOCAL;
+
dev->hw_features = TEAM_VLAN_FEATURES |
NETIF_F_HW_VLAN_CTAG_TX |
NETIF_F_HW_VLAN_CTAG_RX |
--
1.7.12
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists