xtables-addons: fix compile error on kernel 4.18+ 7701/head
authorDeng Qingfang <dengqf6@mail2.sysu.edu.cn>
Mon, 17 Dec 2018 19:44:11 +0000 (03:44 +0800)
committerDeng Qingfang <dengqf6@mail2.sysu.edu.cn>
Mon, 17 Dec 2018 19:44:11 +0000 (03:44 +0800)
Use `struct nf_nat_range2` for kernel 4.18+

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
net/xtables-addons/Makefile
net/xtables-addons/patches/100-add-rtsp-conntrack.patch

index 17da4103f3438f49f4a43ed8b7fa58be9f9dccd3..ee1ad44a39f8b9dcb6730ebcb4aa64d28674198b 100644 (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
index 08ed4e84512aa807adf06b92479afea657d88711..4666ea79b8687141cb45629ed4bc75d0c7d1bc0b 100644 (file)
 +#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>
 +
 +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;