From: Jan Engelhardt Date: Wed, 20 Aug 2025 08:30:49 +0000 (+0200) Subject: xt_pknock: support Linux 6.16 timer API X-Git-Tag: v3.29~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=61762a5f2c07214ba8a9a3d7350bc63b98b25dd5;p=thirdparty%2Fxtables-addons.git xt_pknock: support Linux 6.16 timer API pknock/xt_pknock.c:362:39: error: implicit declaration of function "from_timer"; did you mean "mod_timer"? [-Wimplicit-function-declaration] --- diff --git a/extensions/pknock/xt_pknock.c b/extensions/pknock/xt_pknock.c index be435c4..734e6f2 100644 --- a/extensions/pknock/xt_pknock.c +++ b/extensions/pknock/xt_pknock.c @@ -359,7 +359,11 @@ has_logged_during_this_minute(const struct peer *peer) static void peer_gc(struct timer_list *tl) { unsigned int i; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0) + struct xt_pknock_rule *rule = timer_container_of(rule, tl, timer); +#else struct xt_pknock_rule *rule = from_timer(rule, tl, timer); +#endif struct peer *peer; struct list_head *pos, *n;