The current LINUX_VERSION_CODE check for the nft_expr_ops.validate
callback signature breaks on distribution kernels that backport the
API change (mainline commit eaf9b2c875ec, merged in 6.12) without
updating LINUX_VERSION_CODE.
For example, Ubuntu 24.04's 6.8.0-103+ kernel (stable patchset
2026-01-27, LP: #2139158) includes this backport, causing DKMS
builds to fail with -Werror=incompatible-pointer-types.
Replace the version-based #if with a compile test in the existing
gen-rtpengine-kmod-flags configure script. The test tries to assign
a 3-param function to .validate -- if it compiles, the old API is
present and NFT_EXPR_OPS_VALIDATE_HAS_DATA is set. If it fails, the
kernel has the new 2-param version.
Also use kbuild's KERNELRELEASE variable (instead of uname -r) to
resolve the kernel build directory, so that compile tests and KSRC
target the correct kernel during cross-version DKMS builds.
Tested against Ubuntu 6.8.0-90 (3-param) and 6.8.0-106 (2-param),
including cross-kernel builds where the running kernel differs from
the DKMS target.
Closes#2085
Change-Id: I4c8e55b94fb98c3fcda9dccb091d0d1c0c67f9aa
Add support for RHEL/AlmaLinux/Rocky Linux 9.x kernels which backport
the 'reset' parameter to nft_expr_dump function from kernel 6.2.0.
This affects all RHEL 9 family distributions with kernel 5.14.
Tested on AlmaLinux 9.7 with kernel 5.14.0-611.11.1.el9_7.x86_64
Closes#2038Closes#2037
Change-Id: I305be17cdbf7730acbc7d9b978694c7b0eb37b02
Register expression for IPv4, IPv6, and INET protocols.
Support one u32 attribute, which is the table ID.
Change-Id: If6385dab53c79c9b3de80df470fa537fbb6d33f6
Don't pass the xt_action_param into the inner functions as they don't
need it. Get the struct net pointer first and then pass that down.
Change-Id: I82e95c93ed1066bf051fae63ff7697d72265f24b
We don't track individual uses of the shared memory, so we can't safely
free it when the mapping is closed, as the internal forwarding targets
may still point into it. Delay freeing until the table itself is freed.
Each mmap then counts as another reference on the table. Unmap then
simply decreases the reference count but never actually frees the pages.
Change-Id: Ic33454155cd0083f733711ce52699047cff9e56c
EXTRA_CFLAGS is deprecated and stopped working in 6.15(ish)
Ref: https://bugs.debian.org/1106709
Ref: e966ad0edd
Change-Id: Iba835c7dca89106ff2ca7ffba8a7de947c9a4ff8
We don't have this available before kernel 5.1
Ref: https://bugs.debian.org/1101804
Change-Id: I4f2f768738d0f53fec28ed3f8e8f577cbc13431e
Reported-by: Andreas Beckmann <anbe@debian.org>