[Devel] [PATCH RHEL8 COMMIT] ve/net/gre: Compilation fix for VE_FEATURE_IPGRE feature

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jun 11 19:54:10 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.41
------>
commit ae44dfd38938e60956b8f36b29caca1caf676618
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Fri Jun 11 19:50:59 2021 +0300

    ve/net/gre: Compilation fix for VE_FEATURE_IPGRE feature
    
    Include ve.h header and calculate "ign" in ip6gre_newlink_common().
    
    Fixes: c1d5c0fffabc ("net/gre: Consider VE_FEATURE_IPGRE on new net creation")
    
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 net/ipv6/ip6_gre.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 015038b4bf4a..9af4e89b1bc0 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -34,6 +34,7 @@
 #include <linux/hash.h>
 #include <linux/if_tunnel.h>
 #include <linux/ip6_tunnel.h>
+#include <linux/ve.h>
 
 #include <net/sock.h>
 #include <net/ip.h>
@@ -1966,8 +1967,12 @@ static int ip6gre_newlink_common(struct net *src_net, struct net_device *dev,
 	struct ip6_tnl *nt;
 	struct ip_tunnel_encap ipencap;
 	int err;
-
 #ifdef CONFIG_VE
+	struct net *net = dev_net(dev);
+	struct ip6gre_net *ign;
+
+	ign = net_generic(net, ip6gre_net_id);
+
 	if (!ign) /* no VE_FEATURE_IPGRE */
 		return -EACCES;
 #endif


More information about the Devel mailing list