netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net-next] vlan: Don't allow vlan devices to change network namespaces.
@ 2014-04-22 12:43 Chen Weilong
  2014-04-22 12:54 ` Nicolas Dichtel
  2014-04-22 14:26 ` Eric Dumazet
  0 siblings, 2 replies; 12+ messages in thread
From: Chen Weilong @ 2014-04-22 12:43 UTC (permalink / raw)
  To: kaber, davem; +Cc: netdev

From: Weilong Chen <chenweilong@huawei.com>

Like bonding, vlan as netdevice doesn't cross netns boundaries.

Vlan port and vlan itself live in same netns.

Signed-off-by: Weilong Chen <chenweilong@huawei.com>
---
 net/8021q/vlan_dev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 733ec28..2ef4a54 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -685,6 +685,9 @@ static netdev_features_t vlan_dev_fix_features(struct net_device *dev,
 	features |= old_features & NETIF_F_SOFT_FEATURES;
 	features |= NETIF_F_LLTX;
 
+	/* Don't allow vlan devices to change network namespaces. */
+	features |= NETIF_F_NETNS_LOCAL;
+
 	return features;
 }
 
-- 
1.7.12

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-04-25 10:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-22 12:43 [patch net-next] vlan: Don't allow vlan devices to change network namespaces Chen Weilong
2014-04-22 12:54 ` Nicolas Dichtel
2014-04-22 14:26 ` Eric Dumazet
2014-04-23  2:40   ` chenweilong
2014-04-23  7:23     ` Nicolas Dichtel
2014-04-24  0:59       ` chenweilong
2014-04-24  5:47         ` Michal Kubecek
2014-04-24  7:01           ` Nicolas Dichtel
2014-04-24 11:32           ` chenweilong
2014-04-24 12:41             ` chenweilong
2014-04-24 13:21               ` Nicolas Dichtel
2014-04-25 10:23                 ` chenweilong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).