From f55fb35700c1a355349b0114e3e363a8ca2f904d Mon Sep 17 00:00:00 2001 From: Deng Qingfang Date: Tue, 18 Dec 2018 03:44:11 +0800 Subject: [PATCH] xtables-addons: fix compile error on kernel 4.18+ Use `struct nf_nat_range2` for kernel 4.18+ Signed-off-by: Deng Qingfang --- net/xtables-addons/Makefile | 2 +- net/xtables-addons/patches/100-add-rtsp-conntrack.patch | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/net/xtables-addons/Makefile b/net/xtables-addons/Makefile index 17da4103f..ee1ad44a3 100644 --- a/net/xtables-addons/Makefile +++ b/net/xtables-addons/Makefile @@ -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 diff --git a/net/xtables-addons/patches/100-add-rtsp-conntrack.patch b/net/xtables-addons/patches/100-add-rtsp-conntrack.patch index 08ed4e845..4666ea79b 100644 --- a/net/xtables-addons/patches/100-add-rtsp-conntrack.patch +++ b/net/xtables-addons/patches/100-add-rtsp-conntrack.patch @@ -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 @@ -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;