]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
build: support for Linux 4.9
authorRalph Sennhauser <ralph.sennhauser@gmail.com>
Mon, 26 Dec 2016 15:11:43 +0000 (16:11 +0100)
committerJan Engelhardt <jengelh@inai.de>
Wed, 4 Jan 2017 01:04:14 +0000 (02:04 +0100)
Commit f330a7fdbe1611104622faff7e614a246a7d20f0 (netfilter: conntrack:
get rid of conntrack timer) replaces timer_list with an u32, use helper
from commit c8607e020014cf11a61601a0005270bad81cabdf (netfilter: nft_ct:
fix expiration getter).

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
extensions/xt_LOGMARK.c

index 271931bd6cc2209471d1573f65a4aeda5a016ac1..761696227bd9ad09804eb86db253f92a39d686b0 100644 (file)
@@ -58,8 +58,12 @@ static void logmark_ct(const struct nf_conn *ct, enum ip_conntrack_info ctinfo)
                printk("%s""ASSURED", prev++ ? "," : "");
        if (ct->status & IPS_CONFIRMED)
                printk("%s""CONFIRMED", prev++ ? "," : "");
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
+       printk(" lifetime=%lus", nf_ct_expires(ct) / HZ);
+#else
        printk(" lifetime=%lus",
               (jiffies - ct->timeout.expires) / HZ);
+#endif
 }
 
 static unsigned int