[Devel] [PATCH RH9 01/22] ve/net/ipv6 tunnels: Enable GRE netdevice register inside container

Andrey Zhadchenko andrey.zhadchenko at virtuozzo.com
Thu Oct 7 13:57:25 MSK 2021


From: Vasily Averin <vvs at virtuozzo.com>

v2: fixed thunderbird sentpatch settings

ipv6 tunnel network devices should have NETIF_F_VIRTUAL feature
to be registered inside containers.

Similar problem for sit wa fixed recently in
https://jira.sw.ru/browse/PSBM-127315
Signed-off-by: Vasily Averin <vvs at virtuozzo.com>

(cherry picked from vz8 commit 8dcfa6ce28d3b8fe0fda9b27fa5bbe0dae4045db)
Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
---
 net/ipv6/ip6_gre.c    | 1 +
 net/ipv6/ip6_tunnel.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 7a5e90e..454a4a2 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -1423,6 +1423,7 @@ static void ip6gre_tunnel_setup(struct net_device *dev)
 
 	dev->type = ARPHRD_IP6GRE;
 
+	dev->features |= NETIF_F_VIRTUAL;
 	dev->flags |= IFF_NOARP;
 	dev->addr_len = sizeof(struct in6_addr);
 	netif_keep_dst(dev);
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 322698d..bac3906 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -1832,7 +1832,7 @@ static void ip6_tnl_dev_setup(struct net_device *dev)
 	dev->type = ARPHRD_TUNNEL6;
 	dev->flags |= IFF_NOARP;
 	dev->addr_len = sizeof(struct in6_addr);
-	dev->features |= NETIF_F_LLTX;
+	dev->features |= NETIF_F_LLTX | NETIF_F_VIRTUAL;
 	netif_keep_dst(dev);
 
 	dev->features		|= IPXIPX_FEATURES;
-- 
1.8.3.1



More information about the Devel mailing list