From: Chen Weilong <chenweilong@huawei.com>
To: <jiri@resnulli.us>, <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>
Subject: [PATCH] team: Don't allow team devices to change network namespaces.
Date: Thu, 23 Jan 2014 11:07:22 +0800 [thread overview]
Message-ID: <1390446442-12768-1-git-send-email-chenweilong@huawei.com> (raw)
From: Weilong Chen <chenweilong@huawei.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@huawei.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
next reply other threads:[~2014-01-23 3:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 3:07 Chen Weilong [this message]
2014-01-23 5:59 ` [PATCH] team: Don't allow team devices to change network namespaces David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1390446442-12768-1-git-send-email-chenweilong@huawei.com \
--to=chenweilong@huawei.com \
--cc=davem@davemloft.net \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox