forked from pool/xtables-addons
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
This commit is contained in:
parent
f944435733
commit
5a0a65eb8a
37
init_timer.patch
Normal file
37
init_timer.patch
Normal file
@ -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);
|
@ -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
|
Wed Nov 22 17:38:47 UTC 2017 - jengelh@inai.de
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package xtables-addons
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# 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
|
Source2: http://downloads.sf.net/%name/%name-%version.tar.asc
|
||||||
Source3: %name-preamble
|
Source3: %name-preamble
|
||||||
Source4: %name.keyring
|
Source4: %name.keyring
|
||||||
|
Patch: init_timer.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: %kernel_module_package_buildreqs
|
BuildRequires: %kernel_module_package_buildreqs
|
||||||
@ -66,6 +67,7 @@ main kernel/iptables packages.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
pushd ../
|
pushd ../
|
||||||
|
Loading…
Reference in New Issue
Block a user