[Devel] [PATCH rh7 1/4] net: ipip: enable in container

Vladimir Davydov vdavydov at virtuozzo.com
Thu Jun 23 01:57:02 PDT 2016


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>
---
 net/ipv4/ipip.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index e556a1df5a57..7842dcb2fd65 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);
 }
-- 
2.1.4



More information about the Devel mailing list