[Devel] [PATCH 09/14] venet: prevent to change network namespaces
Kirill Tkhai
ktkhai at odin.com
Mon Jun 8 07:21:54 PDT 2015
Porting patch diff-venet-prevent-to-change-network-namespaces from 2.6.32:
venet is a local device.
Without this patch it may be moved in CT0:
vzctl exec 101 ip link set name xxx dev venet0
vzctl set 101 --netdev_del xxx --save
http://bugzilla.openvz.org/show_bug.cgi?id=2414
Signed-off-by: Andrey Vagin <avagin at openvz.org>
Signed-off-by: Kirill Tkhai <ktkhai at odin.com>
---
drivers/net/venetdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/venetdev.c b/drivers/net/venetdev.c
index 6b7d8fc7..faeed33 100644
--- a/drivers/net/venetdev.c
+++ b/drivers/net/venetdev.c
@@ -1072,6 +1072,7 @@ static int venet_dev_start(struct ve_struct *ve)
err = dev_alloc_name(dev_venet, dev_venet->name);
if (err<0)
goto err;
+ dev_venet->features |= NETIF_F_NETNS_LOCAL;
dev_venet->rtnl_link_ops = &venet_link_ops;
dev_venet->rtnl_link_state = RTNL_LINK_INITIALIZING;
if ((err = register_netdev(dev_venet)) != 0)
More information about the Devel
mailing list