From d1ccd52cf3207399b4ff901fad2e04fe155326f0 Mon Sep 17 00:00:00 2001 From: Xiaoli Chan <2209553467@qq.com> Date: Mon, 23 Nov 2020 17:28:07 +0800 Subject: [PATCH] xtables-addons: update to 3.13 Signed-off-by: Xiaoli Chan <2209553467@qq.com> --- net/xtables-addons/Makefile | 4 +- .../002-restore-support-for-Linux-4.14.patch | 69 ------------------- 2 files changed, 2 insertions(+), 71 deletions(-) delete mode 100644 net/xtables-addons/patches/002-restore-support-for-Linux-4.14.patch diff --git a/net/xtables-addons/Makefile b/net/xtables-addons/Makefile index 49bc2211a..7c29f9de2 100644 --- a/net/xtables-addons/Makefile +++ b/net/xtables-addons/Makefile @@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=xtables-addons -PKG_VERSION:=3.10 +PKG_VERSION:=3.13 PKG_RELEASE:=1 -PKG_HASH:=b783ecbab46ff3534a0aaff2baacc79553f685697b1f034ca61698443b8210dc +PKG_HASH:=893c0c4ea09759cda1ab7e68f1281d125e59270f7b59e446204ce686c6a76d65 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://inai.de/files/xtables-addons/ diff --git a/net/xtables-addons/patches/002-restore-support-for-Linux-4.14.patch b/net/xtables-addons/patches/002-restore-support-for-Linux-4.14.patch deleted file mode 100644 index 97ffeacbd..000000000 --- a/net/xtables-addons/patches/002-restore-support-for-Linux-4.14.patch +++ /dev/null @@ -1,69 +0,0 @@ -Restore support for kernel 4.14 -This reverts commit bf63a25a64c9223435c26e6543ba749834b47752. ---- - configure.ac | 2 +- - extensions/compat_xtables.h | 4 ++-- - extensions/pknock/xt_pknock.c | 16 ++++++++++++++++ - 3 files changed, 19 insertions(+), 3 deletions(-) - ---- a/configure.ac -+++ b/configure.ac -@@ -61,7 +61,7 @@ if test -n "$kbuilddir"; then - echo "WARNING: That kernel version is not officially supported yet. Continue at own luck."; - elif test "$kmajor" -eq 5 -a "$kminor" -ge 0; then - : -- elif test "$kmajor" -eq 4 -a "$kminor" -ge 15; then -+ elif test "$kmajor" -eq 4 -a "$kminor" -ge 14; then - : - else - echo "WARNING: That kernel version is not officially supported."; ---- a/extensions/compat_xtables.h -+++ b/extensions/compat_xtables.h -@@ -8,8 +8,8 @@ - - #define DEBUGP Use__pr_debug__instead - --#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) --# warning Kernels below 4.15 not supported. -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) -+# warning Kernels below 4.14 not supported. - #endif - - #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) ---- a/extensions/pknock/xt_pknock.c -+++ b/extensions/pknock/xt_pknock.c -@@ -356,10 +356,18 @@ has_logged_during_this_minute(const stru - * - * @r: rule - */ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) - static void peer_gc(struct timer_list *tl) -+#else -+static void peer_gc(unsigned long r) -+#endif - { - unsigned int i; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) - struct xt_pknock_rule *rule = from_timer(rule, tl, timer); -+#else -+ struct xt_pknock_rule *rule = (struct xt_pknock_rule *)r; -+#endif - struct peer *peer; - struct list_head *pos, *n; - -@@ -466,7 +474,15 @@ add_rule(struct xt_pknock_mtinfo *info) - rule->peer_head = alloc_hashtable(peer_hashsize); - if (rule->peer_head == NULL) - goto out; -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) - timer_setup(&rule->timer, peer_gc, 0); -+#else -+ init_timer(&rule->timer); -+ rule->timer.function = peer_gc; -+ rule->timer.data = (unsigned long)rule; -+#endif -+ - rule->status_proc = proc_create_data(info->rule_name, 0, pde, - &pknock_proc_ops, rule); - if (rule->status_proc == NULL)