[Devel] [PATCH RHEL8 COMMIT] ve/net/ipv6 tunnels: Enable GRE netdevice register inside container

Konstantin Khorenko khorenko at virtuozzo.com
Tue Apr 13 13:41:19 MSK 2021


The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.12
------>
commit 74a502706a055bdf583090962699a75a049602ce
Author: Vasily Averin <vvs at virtuozzo.com>
Date:   Mon Apr 5 13:29:19 2021 +0300

    ve/net/ipv6 tunnels: Enable GRE netdevice register inside container
    
    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>
---
 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 5246c014a440..114455044b6d 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -1402,6 +1402,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 3bca3d8eebd7..c29f3f236cf0 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -1834,7 +1834,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;


More information about the Devel mailing list