[Devel] [PATCH RHEL7 COMMIT] venet: prevent to change network namespaces

Konstantin Khorenko khorenko at virtuozzo.com
Wed Jun 10 08:08:26 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.12
------>
commit 4a413a71bcd791df4e8cdcb7cb960c52d0549add
Author: Kirill Tkhai <ktkhai at odin.com>
Date:   Wed Jun 10 19:08:23 2015 +0400

    venet: prevent to change network namespaces
    
    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