Browse Source

xtables-addons: fix compile error on kernel 4.18+

Use `struct nf_nat_range2` for kernel 4.18+

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
lilik-openwrt-22.03
Deng Qingfang 6 years ago
parent
commit
f55fb35700
2 changed files with 5 additions and 3 deletions
  1. +1
    -1
      net/xtables-addons/Makefile
  2. +4
    -2
      net/xtables-addons/patches/100-add-rtsp-conntrack.patch

+ 1
- 1
net/xtables-addons/Makefile View File

@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=xtables-addons
PKG_VERSION:=2.14
PKG_RELEASE:=5
PKG_RELEASE:=6
PKG_HASH:=d215a9a8b8e66aae04b982fa2e1228e8a71e7dfe42320df99e34e5000cbdf152
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz


+ 4
- 2
net/xtables-addons/patches/100-add-rtsp-conntrack.patch View File

@ -1076,7 +1076,7 @@
+#endif /* _IP_CONNTRACK_RTSP_H */
--- /dev/null
+++ b/extensions/rtsp/nf_nat_rtsp.c
@@ -0,0 +1,634 @@
@@ -0,0 +1,636 @@
+/*
+ * RTSP extension for TCP NAT alteration
+ * (C) 2003 by Tom Marshall <tmarshall at real.com>
@ -1630,7 +1630,9 @@
+
+static void nf_nat_rtsp_expected(struct nf_conn* ct, struct nf_conntrack_expect *exp)
+{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0)
+ struct nf_nat_range2 range;
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
+ struct nf_nat_range range;
+#else
+ struct nf_nat_ipv4_range range;


Loading…
Cancel
Save