Skip to content

Fix Linux 6.17 kernel API compatibility#254

Open
absalonCRC wants to merge 1 commit into
aabc:masterfrom
absalonCRC:codex/linux-6-17-compat
Open

Fix Linux 6.17 kernel API compatibility#254
absalonCRC wants to merge 1 commit into
aabc:masterfrom
absalonCRC:codex/linux-6-17-compat

Conversation

@absalonCRC
Copy link
Copy Markdown

Fixes #250. Also covers the build failure in #249.

This updates the module for recent kernel API changes that show up on 6.17-era kernels:

  • use linux/unaligned.h from Linux 6.12 onward and keep gen_compat_def testing the right header for put_unaligned_be24
  • use const sysctl handler signatures and drop sysctl sentinel entries from Linux 6.11 onward
  • replace remaining strlcpy calls with strscpy, with an old-kernel fallback
  • use timer_delete_sync from Linux 6.15 onward
  • map deprecated prandom_u32* helpers to get_random_u32* on newer kernels

The guards are based on the Debian/Ubuntu iptables-netflow DKMS compatibility fixes for Linux 6.11, 6.12, and 6.15, folded into the upstream tree.

Local checks I could run from this macOS host:

  • git diff --check
  • bash -n gen_compat_def
  • bash -n configure

I cannot locally load/build the kernel module on this host, so the important runtime check is still dkms build / modprobe ipt_NETFLOW on the target Linux 6.17 system.

Support recent kernel API changes that break module builds and loading on 6.17-era kernels: const sysctl handlers, no sysctl sentinel entries from 6.11, linux/unaligned.h from 6.12, strscpy instead of strlcpy, and timer_delete_sync from 6.15.

The compatibility guards follow the Debian/Ubuntu iptables-netflow DKMS fixes for Linux 6.11, 6.12, and 6.15 while keeping older kernel support.
@absalonCRC absalonCRC mentioned this pull request May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BOUNTY offered

1 participant