From 08f73134668a381d627bc6ee352130374b0a4ee3 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 12 Dec 2025 19:34:13 +0000 Subject: [PATCH] Fix nft_rtpengine compilation on RHEL/AlmaLinux 9.x kernel 5.14 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 --- kernel-module/nft_rtpengine.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel-module/nft_rtpengine.c b/kernel-module/nft_rtpengine.c index 7c77b6688..fd87fe5ce 100644 --- a/kernel-module/nft_rtpengine.c +++ b/kernel-module/nft_rtpengine.c @@ -6830,8 +6830,10 @@ static int rtpengine_expr_init(const struct nft_ctx *ctx, const struct nft_expr } static int rtpengine_expr_dump(struct sk_buff *skb, const struct nft_expr *expr -#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0) - , bool reset +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0) || \ + (LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \ + defined(RHEL_RELEASE_CODE) && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,0)) + , bool reset #endif ) {