ipt-netflow icon indicating copy to clipboard operation
ipt-netflow copied to clipboard

Fix Linux 6.17 kernel API compatibility

Open absalonCRC opened this issue 6 months ago • 0 comments

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.

absalonCRC avatar May 24 '26 12:05 absalonCRC