lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ