[Devel] [PATCH RHEL7 COMMIT] ve/net: ipip: enable in container

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jun 24 03:30:29 PDT 2016


The commit is pushed to "branch-rh7-3.10.0-327.18.2.vz7.14.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.18.2.vz7.14.19
------>
commit 976dd76adc39ba0926e3d764dc39dfa2873ccdb0
Author: Vladimir Davydov <vdavydov at virtuozzo.com>
Date:   Fri Jun 24 14:30:29 2016 +0400

    ve/net: ipip: enable in container
    
    Currently, we fail to init ipip per-net in a ve, because it has neither
    NETIF_F_VIRTUAL nor NETIF_F_NETNS_LOCAL:
    
     ipip_init_net
      ip_tunnel_init_net
       __ip_tunnel_create
        register_netdevice
         ve_is_dev_movable
    
    In PCS6 ipip has NETIF_F_NETNS_LOCAL, so everything works fine there,
    but this restriction was removed in RH7 kernel, so we fail to start a
    container if ipip is loaded (or load ipip if there are containers
    running).
    
    Mark ipip as NETIF_F_VIRTUAL to fix this issue.
    
    https://jira.sw.ru/browse/PSBM-48608
    
    Signed-off-by: Vladimir Davydov <vdavydov at virtuozzo.com>
    Tested-by: Evgenii Shatokhin <eshatokhin at virtuozzo.com>
---
 net/ipv4/ipip.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index e556a1d..7842dcb 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -301,6 +301,7 @@ static void ipip_tunnel_setup(struct net_device *dev)
 	netif_keep_dst(dev);
 
 	dev->features		|= IPIP_FEATURES;
+	dev->features		|= NETIF_F_VIRTUAL;
 	dev->hw_features	|= IPIP_FEATURES;
 	ip_tunnel_setup(dev, ipip_net_id);
 }


More information about the Devel mailing list