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>
This commit is contained in:
Tianling Shen
2025-11-02 17:16:16 +08:00
parent 53e6075243
commit d2f7f43af2
2 changed files with 4 additions and 3 deletions
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=fullconenat-nft
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/fullcone-nat-nftables/nft-fullcone.git
@@ -1,10 +1,11 @@
--- a/src/nft_ext_fullcone.c
+++ b/src/nft_ext_fullcone.c
@@ -121,7 +121,11 @@ static int exp_event_cb(unsigned int eve
@@ -121,7 +121,12 @@ static int exp_event_cb(unsigned int eve
}
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
+#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 113)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 7, 0))) || \
+ (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 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)