Some fixes for v6.15
cover Some fixes for v6.15
Replace a couple of deprecated things that were removed in v6.15 and bump the maximum supported version.
Jeremy Sowden (3):
build: replace obsolete EXTRA_CFLAGS
xt_pknock: replace obsolete del_timer
build: bump max. supported version to 6.15
configure.ac | 2 +- extensions/ACCOUNT/Kbuild | 2 +- extensions/pknock/Kbuild | 2 +- extensions/pknock/xt_pknock.c | 8 ++++++-- 4 files changed, 9 insertions(+), 5 deletions(-)
Signature · 1 line
2.47.2
PATCH 1/3 build: replace obsolete `EXTRA_CFLAGS`
EXTRA_CFLAGS was superseded by ccflags-y, introduced in 2007, and it has been removed in v6.15. Replace it.
--- extensions/ACCOUNT/Kbuild | 2 +- extensions/pknock/Kbuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
extensions/ACCOUNT/Kbuild +1 -1
@@ -1,5 +1,5 @@ # -*- Makefile -*- -EXTRA_CFLAGS = -I${src}/.. +ccflags-y += -I${src}/.. obj-m += xt_ACCOUNT.o
extensions/pknock/Kbuild +1 -1
@@ -1,5 +1,5 @@ # -*- Makefile -*- -EXTRA_CFLAGS = -I${src}/.. +ccflags-y += -I${src}/.. obj-m += xt_pknock.o
Signature · 1 line
2.47.2
PATCH 2/3 xt_pknock: replace obsolete `del_timer`
In reply to Jeremy Sowdendel_timer was a wrapper around timer_delete, and it has been removed in v6.15. Replace it.
--- extensions/pknock/xt_pknock.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
extensions/pknock/xt_pknock.c +6 -2
@@ -30,6 +30,10 @@#include "xt_pknock.h" #include "compat_xtables.h" +#if LINUX_VERSION_CODE <KERNEL_VERSION (6 ,15 ,0 ) +#define timer_delete (X ) del_timer(X) +#endif +enum status {ST_INIT =1 ,ST_MATCHING ,
@@ -296,7 +300,7 @@ static const struct proc_ops pknock_proc_ops = {static void update_rule_gc_timer (struct xt_pknock_rule *rule) {if (timer_pending (&rule->timer)) -del_timer (&rule->timer); +timer_delete (&rule->timer); rule->timer.expires = jiffies +msecs_to_jiffies (gc_expir_time);add_timer (&rule->timer); }
@@ -517,7 +521,7 @@ remove_rule(struct xt_pknock_mtinfo *info)remove_proc_entry (info->rule_name, pde);pr_debug ("(D) rule deleted: %s.\n" , rule->rule_name);if (timer_pending (&rule->timer)) -del_timer (&rule->timer); +timer_delete (&rule->timer);list_del (&rule->head);kfree (rule->peer_head);kfree (rule);
Signature · 1 line
2.47.2
Re: [PATCH xtables-addons 2/3] xt_pknock: replace obsolete `del_timer`
Quoted 2 lines · Jeremy Sowden
del_timerwas a wrapper aroundtimer_delete, and it has been removed in v6.15. Replace it.
This needs tweaking slightly. Will resend.
Quoted 42 lines
Signed-off-by Jeremy Sowden <[email protected]>---
extensions/pknock/xt_pknock.c| 8 ++++++--1 file changed, 6 insertions(+), 2 deletions(-)extensions/pknock/xt_pknock.c +6
-2@@ -30,6 +30,10 @@#include "xt_pknock.h" #include "compat_xtables.h" +#if LINUX_VERSION_CODE <KERNEL_VERSION (6 ,15 ,0 ) +#define timer_delete (X ) del_timer(X) +#endif +enum status {ST_INIT =1 ,ST_MATCHING ,@@ -296,7 +300,7 @@ static const struct proc_ops pknock_proc_ops = {static void update_rule_gc_timer (struct xt_pknock_rule *rule) {if (timer_pending (&rule-> timer)) -del_timer (&rule-> timer); +timer_delete (&rule-> timer); rule-> timer.expires = jiffies +msecs_to_jiffies (gc_expir_time);add_timer (&rule-> timer); }@@ -517,7 +521,7 @@ remove_rule(struct xt_pknock_mtinfo *info)remove_proc_entry (info-> rule_name, pde);pr_debug ("(D) rule deleted: %s.\n" , rule-> rule_name);if (timer_pending (&rule-> timer)) -del_timer (&rule-> timer); +timer_delete (&rule-> timer);list_del (&rule-> head);kfree (rule-> peer_head);kfree (rule);Signature · 1 line
2.47.2
PATCH 3/3 build: bump max. supported version to 6.15
In reply to Jeremy Sowden--- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
@@ -63,7 +63,7 @@ AS_IF([test -n "$kbuilddir"], [ luck=0 unsup=0 AS_IF([test "$kmajor" -gt 6], [luck=1]) - AS_IF([test "$kmajor" -eq 6 && test "$kminor" -gt 12], [luck=1]) + AS_IF([test "$kmajor" -eq 6 && test "$kminor" -gt 15], [luck=1]) AS_IF([test "$kmajor" -eq 5 && test "$kminor" -lt 4], [unsup=1]) AS_IF([test "$kmajor" -lt 5], [unsup=1]) AS_IF([test "$luck" = 1], [
Signature · 1 line
2.47.2