diff -Nru xtables-addons-2.12/debian/changelog xtables-addons-2.12/debian/changelog --- xtables-addons-2.12/debian/changelog 2017-10-31 15:09:28.000000000 -0200 +++ xtables-addons-2.12/debian/changelog 2018-06-20 11:45:55.000000000 -0300 @@ -1,3 +1,11 @@ +xtables-addons (2.12-0.1~16.04.3) xenial; urgency=medium + + * Fix module build error with Linux 4.15 (LP: #1777894) + - debian/patches/buildfix-4.14.patch + - debian/patches/buildfix-4.15.patch + + -- Marcelo Henrique Cerri Wed, 20 Jun 2018 11:45:55 -0300 + xtables-addons (2.12-0.1~16.04.2) xenial; urgency=medium * Fix module build error with Linux 4.12+ (LP: #1724875) diff -Nru xtables-addons-2.12/debian/patches/buildfix-4.14.patch xtables-addons-2.12/debian/patches/buildfix-4.14.patch --- xtables-addons-2.12/debian/patches/buildfix-4.14.patch 1969-12-31 21:00:00.000000000 -0300 +++ xtables-addons-2.12/debian/patches/buildfix-4.14.patch 2018-06-19 14:20:53.000000000 -0300 @@ -0,0 +1,24 @@ +From 0a6091b64afc3d67c8a9194b8f6230122384f6d9 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Wed, 22 Nov 2017 18:27:07 +0100 +Subject: [PATCH] DNETMAP: remove NF_CT_ASSERT use + +The hooks are already checked by the xtables core (due to struct +xt_target::hooks). +--- + extensions/xt_DNETMAP.c | 4 ---- + 1 file changed, 4 deletions(-) + +--- a/extensions/xt_DNETMAP.c ++++ b/extensions/xt_DNETMAP.c +@@ -376,10 +376,6 @@ + #else + unsigned int hooknum = par->hooknum; + #endif +- +- NF_CT_ASSERT(hooknum == NF_INET_POST_ROUTING || +- hooknum == NF_INET_LOCAL_OUT || +- hooknum == NF_INET_PRE_ROUTING); + ct = nf_ct_get(skb, &ctinfo); + + jttl = tginfo->flags & XT_DNETMAP_TTL ? tginfo->ttl * HZ : jtimeout; diff -Nru xtables-addons-2.12/debian/patches/buildfix-4.15.patch xtables-addons-2.12/debian/patches/buildfix-4.15.patch --- xtables-addons-2.12/debian/patches/buildfix-4.15.patch 1969-12-31 21:00:00.000000000 -0300 +++ xtables-addons-2.12/debian/patches/buildfix-4.15.patch 2018-06-19 14:26:23.000000000 -0300 @@ -0,0 +1,48 @@ +From 2b76b68c65c97fc11409088c3c30993324df8500 Mon Sep 17 00:00:00 2001 +From: Marcelo Henrique Cerri +Date: Thu, 4 Jan 2018 18:50:50 +0100 +Subject: [PATCH] build: support for Linux 4.15 + +Signed-off-by: Marcelo Henrique Cerri +--- + extensions/pknock/xt_pknock.c | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +--- a/extensions/pknock/xt_pknock.c ++++ b/extensions/pknock/xt_pknock.c +@@ -358,10 +358,20 @@ + * @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 @@ + 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 -Nru xtables-addons-2.12/debian/patches/series xtables-addons-2.12/debian/patches/series --- xtables-addons-2.12/debian/patches/series 2017-10-31 15:09:28.000000000 -0200 +++ xtables-addons-2.12/debian/patches/series 2018-06-20 11:41:16.000000000 -0300 @@ -1,2 +1,4 @@ #automake-1.11.2.patch buildfix-4.12.patch +buildfix-4.14.patch +buildfix-4.15.patch