From 45e0a4c083904ed18df219dff7af860080f35e6d Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Thu, 12 Jul 2018 16:58:31 +0200 Subject: [PATCH] - updated to 3.0, modules require Linux >= 4.15 --- kernel-4.15.patch | 48 --------------------------------------------- xtables-addons.spec | 10 ++++------ 2 files changed, 4 insertions(+), 54 deletions(-) delete mode 100644 kernel-4.15.patch diff --git a/kernel-4.15.patch b/kernel-4.15.patch deleted file mode 100644 index 44a0edc..0000000 --- a/kernel-4.15.patch +++ /dev/null @@ -1,48 +0,0 @@ -commit 2b76b68c65c97fc11409088c3c30993324df8500 -Author: Marcelo Henrique Cerri -Date: Thu Jan 4 18:50:50 2018 +0100 - - build: support for Linux 4.15 - - Signed-off-by: Marcelo Henrique Cerri - -diff --git a/extensions/pknock/xt_pknock.c b/extensions/pknock/xt_pknock.c -index 6fbdea4..31d4bc8 100644 ---- a/extensions/pknock/xt_pknock.c -+++ b/extensions/pknock/xt_pknock.c -@@ -358,10 +358,20 @@ has_logged_during_this_minute(const struct peer *peer) - * @r: rule - */ - static void --peer_gc(unsigned long r) -+peer_gc( -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) -+ struct timer_list *tl -+#else -+ 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; - -@@ -469,9 +479,13 @@ add_rule(struct xt_pknock_mtinfo *info) - 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); diff --git a/xtables-addons.spec b/xtables-addons.spec index f2c60fc..44bd7ba 100644 --- a/xtables-addons.spec +++ b/xtables-addons.spec @@ -1,5 +1,5 @@ # -# UPDATE WARNING: xtables-addons 2.0 support only kernels 3.7+ +# UPDATE WARNING: xtables-addons 3.0 support only kernels 4.15+ # # # Conditional build: @@ -26,18 +26,17 @@ exit 1 Summary: Additional extensions for xtables packet filtering system Summary(pl.UTF-8): Dodatkowe rozszerzenia do systemu filtrowania pakietów xtables Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel} -Version: 2.14 +Version: 3.0 Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}} License: GPL v2 Group: Networking/Admin Source0: http://downloads.sourceforge.net/xtables-addons/%{pname}-%{version}.tar.xz -# Source0-md5: ebb073119a5f250dbfe6b855fcad56fd -Patch0: kernel-4.15.patch +# Source0-md5: b37ed4d9c28cdcd5558c55934be8d051 URL: http://xtables-addons.sourceforge.net/ BuildRequires: autoconf >= 2.65 BuildRequires: automake >= 1:1.11 BuildRequires: iptables-devel >= 1.4.5 -%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:3.7.0}} +%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:4.15.0}} BuildRequires: libtool BuildRequires: pkgconfig >= 0.9.0 BuildRequires: rpmbuild(macros) >= 1.678 @@ -111,7 +110,6 @@ done\ %prep %setup -q -n %{pname}-%{version} -%patch0 -p1 %build %configure \ -- 2.43.0