From 5a0a65eb8a3c73ee8fbbbf4168e1c96e9f9c789f7ec2e8060303f9599e78f92c Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 5 Feb 2018 22:58:54 +0000 Subject: [PATCH] Accepting request 573156 from home:adkorte:branches:security:netfilter - Backport from upstream * Support for Linux 4.15 OBS-URL: https://build.opensuse.org/request/show/573156 OBS-URL: https://build.opensuse.org/package/show/security:netfilter/xtables-addons?expand=0&rev=111 --- init_timer.patch | 37 +++++++++++++++++++++++++++++++++++++ xtables-addons.changes | 6 ++++++ xtables-addons.spec | 4 +++- 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 init_timer.patch diff --git a/init_timer.patch b/init_timer.patch new file mode 100644 index 0000000..907e7f5 --- /dev/null +++ b/init_timer.patch @@ -0,0 +1,37 @@ +--- a/extensions/pknock/xt_pknock.c ++++ b/extensions/pknock/xt_pknock.c +@@ -357,11 +357,18 @@ + * + * @r: rule + */ +-static void +-peer_gc(unsigned long r) ++#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; + +@@ -469,9 +476,13 @@ + 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.changes b/xtables-addons.changes index 93fc207..5c458b4 100644 --- a/xtables-addons.changes +++ b/xtables-addons.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 5 17:55:51 UTC 2018 - suse+build@de-korte.org + +- Backport from upstream + * Support for Linux 4.15 + ------------------------------------------------------------------- Wed Nov 22 17:38:47 UTC 2017 - jengelh@inai.de diff --git a/xtables-addons.spec b/xtables-addons.spec index 8fb13ae..0869e06 100644 --- a/xtables-addons.spec +++ b/xtables-addons.spec @@ -1,7 +1,7 @@ # # spec file for package xtables-addons # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,6 +30,7 @@ Source: http://downloads.sf.net/%name/%name-%version.tar.xz Source2: http://downloads.sf.net/%name/%name-%version.tar.asc Source3: %name-preamble Source4: %name.keyring +Patch: init_timer.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: %kernel_module_package_buildreqs @@ -66,6 +67,7 @@ main kernel/iptables packages. %prep %setup -q +%patch -p1 %build pushd ../