aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2020-02-05 22:57:14 +0100
committerKoen Vandeputte <koen.vandeputte@ncentric.com>2020-02-28 17:50:46 +0100
commitc9ef72aa135983399f804c727054365cb6dcd3c6 (patch)
tree41e6f30952842b72a2cca8127842aa496b80af1c /package
parentcc34b55b77f007efff49c346c3962576c183b5ad (diff)
downloadupstream-c9ef72aa135983399f804c727054365cb6dcd3c6.tar.gz
upstream-c9ef72aa135983399f804c727054365cb6dcd3c6.tar.bz2
upstream-c9ef72aa135983399f804c727054365cb6dcd3c6.zip
nat46: Fix compile with kernel 5.4
nf_reset() was renamed to nf_reset_ct() in upstream Linux commit 895b5c9f206e ("netfilter: drop bridge nf reset from nf_reset)" Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'package')
-rw-r--r--package/kernel/nat46/patches/100-kernel-5.4-compat.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/package/kernel/nat46/patches/100-kernel-5.4-compat.patch b/package/kernel/nat46/patches/100-kernel-5.4-compat.patch
new file mode 100644
index 0000000000..076bf2a61d
--- /dev/null
+++ b/package/kernel/nat46/patches/100-kernel-5.4-compat.patch
@@ -0,0 +1,34 @@
+--- a/nat46/modules/nat46-core.c
++++ b/nat46/modules/nat46-core.c
+@@ -17,6 +17,7 @@
+ */
+
+ #include <net/route.h>
++#include <linux/version.h>
+
+ #include "nat46-glue.h"
+ #include "nat46-core.h"
+@@ -1598,7 +1599,11 @@ void nat46_ipv6_input(struct sk_buff *ol
+ /* Remove any debris in the socket control block */
+ memset(IPCB(new_skb), 0, sizeof(struct inet_skb_parm));
+ /* Remove netfilter references to IPv6 packet, new netfilter references will be created based on IPv4 packet */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0)
+ nf_reset(new_skb);
++#else
++ nf_reset_ct(new_skb);
++#endif
+
+ /* modify packet: actual IPv6->IPv4 transformation */
+ truncSize = v6packet_l3size - sizeof(struct iphdr); /* chop first 20 bytes */
+@@ -1803,7 +1808,11 @@ void nat46_ipv4_input(struct sk_buff *ol
+ /* Remove any debris in the socket control block */
+ memset(IPCB(new_skb), 0, sizeof(struct inet_skb_parm));
+ /* Remove netfilter references to IPv4 packet, new netfilter references will be created based on IPv6 packet */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0)
+ nf_reset(new_skb);
++#else
++ nf_reset_ct(new_skb);
++#endif
+
+ /* expand header (add 20 extra bytes at the beginning of sk_buff) */
+ pskb_expand_head(new_skb, IPV6V4HDRDELTA + (add_frag_header?8:0), 0, GFP_ATOMIC);