Reuse the existing skb whenever possible for normal forwarding. Make a
copy only when needed: when decrypying or encrypting, or when there's
not enough space.
Change-Id: Ia3b020e65dcfcf0c4a63502607431144af44b1f4
Return the skb or NULL instead of true/false.
Take ownership of the passed skb and move the free into the inner
function on failure.
No functional change.
Change-Id: Ifb4f2f34f85f7c8b93accd781dc309f4dfa794b6
Combine error_nf_action with nf_action. Set the appropriate return value
based on the code path.
No functional change.
Change-Id: I548e1d6dbaeb38ce22c1dbcc3a8b697d995a77bc
We don't modify the skb for demux, so we can do the copy after we've
determined that it's needed. Requires more adjusting of the early-return
goto targets.
No functional change.
Change-Id: I8623e52170362b573921b1649cc6a95513b5c76a
Make the skb copy only once we know that it's for a known target.
Implies a rework of some of the early-return gotos.
No functional change.
Change-Id: Ibf5d09c0df2a91cfb50f3181e80114539e4f50a6
Make the skb copy within the worker function instead of its callers.
Combines two identical pieces of code into one.
No functional change.
Change-Id: I9ee97c8a2588ca9f88e79b92a9fa880feaa8e156
Use the existing offsets to network/transport header to determine how
much needs to be pulled back. Then we can combine these code snippets
into one.
No functional change.
Change-Id: I34eeb707da9baad0891d2fbb2d8d9fc95e027204
Only do deletion if no other refs are open.
Add new "kill" method to override this.
Handle spurious EBUSY in daemon shutdown.
Change-Id: Ic84a0c3c1e3a007052baf19d22d79cbccf12c414
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