[PATCH] ebpf: avoid to include if_tunnel.h
authorEric Leblond <eric@regit.org>
Thu, 31 Oct 2019 12:29:56 +0000 (13:29 +0100)
committerSascha Steinbiss <satta@debian.org>
Thu, 20 Jul 2023 09:03:07 +0000 (10:03 +0100)
This is causing a dependency issue as file from another architecture
have to be installed.

Gbp-Pq: Name avoid-to-include-if_tunnel-h.patch

ebpf/xdp_lb.c

index a88724ea2885315321da78b4853a460c7a415277..0a7277ea8874de874685fb04ea03b44286b7675f 100644 (file)
@@ -26,7 +26,6 @@
 /* Workaround to avoid the need of 32bit headers */
 #define _LINUX_IF_H
 #define IFNAMSIZ 16
-#include <linux/if_tunnel.h>
 #include <linux/ip.h>
 #include <linux/ipv6.h>
 #include <linux/tcp.h>
 
 #include "hash_func01.h"
 
+#define GRE_CSUM        __cpu_to_be16(0x8000)
+#define GRE_ROUTING     __cpu_to_be16(0x4000)
+#define GRE_KEY         __cpu_to_be16(0x2000)
+#define GRE_SEQ         __cpu_to_be16(0x1000)
+#define GRE_VERSION     __cpu_to_be16(0x0007)
+
 #define LINUX_VERSION_CODE 263682
 
 /* Hashing initval */