[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1398170586-6668-1-git-send-email-chenweilong@huawei.com>
Date: Tue, 22 Apr 2014 20:43:06 +0800
From: Chen Weilong <chenweilong@...wei.com>
To: <kaber@...sh.net>, <davem@...emloft.net>
CC: <netdev@...r.kernel.org>
Subject: [patch net-next] vlan: Don't allow vlan devices to change network namespaces.
From: Weilong Chen <chenweilong@...wei.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@...wei.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
--
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