fullconenat-nft: fix build with kernel 6.6.113

Upstream kernel dropped 3rd argument from validate callback ops in
commit df0ffc4b51e9 ("netfilter: nf_tables: drop unused 3rd argument from validate callback ops").

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit d2f7f43af2)
This commit is contained in:
Tianling Shen
2025-11-02 17:19:47 +08:00
parent b44e94aee4
commit 12a23b5bf0
2 changed files with 15 additions and 1 deletions
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=fullconenat-nft
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/fullcone-nat-nftables/nft-fullcone.git
@@ -0,0 +1,14 @@
--- a/src/nft_ext_fullcone.c
+++ b/src/nft_ext_fullcone.c
@@ -121,7 +121,11 @@ static int exp_event_cb(unsigned int eve
}
#endif
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 113)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 7, 0))
+static int nft_fullcone_validate(const struct nft_ctx *ctx, const struct nft_expr *expr)
+#else
static int nft_fullcone_validate(const struct nft_ctx *ctx, const struct nft_expr *expr, const struct nft_data **data)
+#endif
{
int err;