6.12.101+ has removed this as well. Use the macro itself to determine
whether this struct member exists.
Change-Id: Ib43157567a78afc664398b9f22ee0a27b0facfa0
(cherry picked from commit 83b05e9a11)
(cherry picked from commit ca1ed34d35)
On some 32-bit architectures, such as armhf, the CPU does not have a
64-bit division instruction, and the compiler injects an intrinsic
function reference (such as __aeabi_ldivmod) that is provided for
example by libgcc.
When compiling Linux kernel code, we are not using libgcc, so such
references end up being undefined, failing the link. Instead we need to
use support provided by the kernel itself. In this case the do_div()
macro.
Change-Id: I5ed60aee487e66d6fcfc2293644d773b6820c178
(cherry picked from commit b688988363)
(cherry picked from commit 069ce8ca16)
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