commit 49b5b67d13167d0fc46847039980ae233e17386e
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Thu Nov 17 19:25:21 2022 +0100
Add fixes
Fixes-for-rhel8-kernel.patch | 40 ++++++++++++++++++++++++++++++++++++++++
Fixes-for-rhel9-kernel.patch | 26 ++++++++++++++++++++++++++
2 files changed, 66 insertions(+)
---
diff --git a/Fixes-for-rhel8-kernel.patch b/Fixes-for-rhel8-kernel.patch
new file mode 100644
index 0000000..fe6c3c6
--- /dev/null
+++ b/Fixes-for-rhel8-kernel.patch
@@ -0,0 +1,40 @@
+From 714af93e290134dd66ea7fec824a6637ef8ecd7e Mon Sep 17 00:00:00 2001
+From: Nicolas Chauvet <kwizart(a)gmail.com>
+Date: Thu, 17 Nov 2022 18:37:25 +0100
+Subject: [PATCH] Fixes for rhel8 kernel
+
+Signed-off-by: Nicolas Chauvet <kwizart(a)gmail.com>
+---
+ extensions/compat_xtables.h | 2 +-
+ extensions/xt_ipp2p.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/extensions/compat_xtables.h b/extensions/compat_xtables.h
+index 1feea880057d..0a362177e19b 100644
+--- a/extensions/compat_xtables.h
++++ b/extensions/compat_xtables.h
+@@ -21,7 +21,7 @@
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0) || \
+ LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 9) && LINUX_VERSION_CODE <
KERNEL_VERSION(5, 10, 0) || \
+ LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 78) && LINUX_VERSION_CODE <
KERNEL_VERSION(5, 5, 0) || \
+- LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 158) && LINUX_VERSION_CODE
< KERNEL_VERSION(4, 20, 0)
++ LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0) && LINUX_VERSION_CODE <
KERNEL_VERSION(4, 20, 0)
+ #else
+ # define ip_route_me_harder(xnet, xsk, xskb, xaddrtype) ip_route_me_harder((xnet),
(xskb), (xaddrtype))
+ # define ip6_route_me_harder(xnet, xsk, xskb) ip6_route_me_harder((xnet), (xskb))
+diff --git a/extensions/xt_ipp2p.c b/extensions/xt_ipp2p.c
+index 2a9f3e4553b0..043f1b740493 100644
+--- a/extensions/xt_ipp2p.c
++++ b/extensions/xt_ipp2p.c
+@@ -19,7 +19,7 @@ MODULE_AUTHOR("Eicke Friedrich/Klaus Degner
<ipp2p(a)ipp2p.org>");
+ MODULE_DESCRIPTION("An extension to iptables to identify P2P traffic.");
+ MODULE_LICENSE("GPL");
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0)
+ static inline unsigned int
+ ip_transport_len(const struct sk_buff *skb)
+ {
+--
+2.38.1
+
diff --git a/Fixes-for-rhel9-kernel.patch b/Fixes-for-rhel9-kernel.patch
new file mode 100644
index 0000000..acdd159
--- /dev/null
+++ b/Fixes-for-rhel9-kernel.patch
@@ -0,0 +1,26 @@
+From a4a57555c8e6ebf23283cdd9307728bf5c432bc8 Mon Sep 17 00:00:00 2001
+From: Nicolas Chauvet <kwizart(a)gmail.com>
+Date: Thu, 17 Nov 2022 18:46:06 +0100
+Subject: [PATCH] Fixes for rhel9 kernel
+
+Signed-off-by: Nicolas Chauvet <kwizart(a)gmail.com>
+---
+ extensions/compat_xtables.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/extensions/compat_xtables.h b/extensions/compat_xtables.h
+index 0a362177e19b..1c32ff4e9836 100644
+--- a/extensions/compat_xtables.h
++++ b/extensions/compat_xtables.h
+@@ -26,7 +26,7 @@
+ # define ip_route_me_harder(xnet, xsk, xskb, xaddrtype) ip_route_me_harder((xnet),
(xskb), (xaddrtype))
+ # define ip6_route_me_harder(xnet, xsk, xskb) ip6_route_me_harder((xnet), (xskb))
+ #endif
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) && !defined(RHEL_MAJOR)
+ # define pde_data(inode) PDE_DATA(inode)
+ #endif
+
+--
+2.38.1
+