ipt-netflow
ipt-netflow copied to clipboard
Fix Linux 6.17 kernel API compatibility
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.hfrom Linux 6.12 onward and keepgen_compat_deftesting the right header forput_unaligned_be24 - use const sysctl handler signatures and drop sysctl sentinel entries from Linux 6.11 onward
- replace remaining
strlcpycalls withstrscpy, with an old-kernel fallback - use
timer_delete_syncfrom Linux 6.15 onward - map deprecated
prandom_u32*helpers toget_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 --checkbash -n gen_compat_defbash -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.