From 4d9dc76611853123723eda8af68cfc10e54e8d09 Mon Sep 17 00:00:00 2001 From: Tomaz Zaman Date: Thu, 13 Aug 2026 01:01:49 +0200 Subject: [PATCH 58/62] libnetfilter-conntrack: static_assert the CTA_LAYERSCAPE_FP ABI numbers (#9) Mono's userspace half of the #9 ABI tripwire: a file-scope _Static_assert in parse_mnl.c that CTA_LAYERSCAPE_FP_ORIG == 27 && CTA_LAYERSCAPE_FP_REPLY == 28, matching the kernel and ASK-Yocto asserts. A future rebase that shifts enum ctattr_type on one side now fails the build loudly instead of silently misfiling fast-path conntrack metadata. Co-Authored-By: Claude Opus 4.8 --- .../patches/900-nxp-ask-comcerto-fp-extensions.patch | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package/libs/libnetfilter-conntrack/patches/900-nxp-ask-comcerto-fp-extensions.patch b/package/libs/libnetfilter-conntrack/patches/900-nxp-ask-comcerto-fp-extensions.patch index c25ab9d153..2e29124e76 100644 --- a/package/libs/libnetfilter-conntrack/patches/900-nxp-ask-comcerto-fp-extensions.patch +++ b/package/libs/libnetfilter-conntrack/patches/900-nxp-ask-comcerto-fp-extensions.patch @@ -436,10 +436,15 @@ diff --git a/src/conntrack/parse_mnl.c b/src/conntrack/parse_mnl.c index 3cbfc6a..33f7824 100644 --- a/src/conntrack/parse_mnl.c +++ b/src/conntrack/parse_mnl.c -@@ -856,6 +856,129 @@ static int nfct_parse_synproxy(const struct nlattr *attr, +@@ -856,6 +856,134 @@ static int nfct_parse_synproxy(const struct nlattr *attr, return 0; } ++/* NXP ASK: fast-path attrs are matched by NUMBER vs the kernel; a standard ++ * CTA_* inserted above shifts them and silently misfiles offload metadata. */ ++_Static_assert(CTA_LAYERSCAPE_FP_ORIG == 27 && CTA_LAYERSCAPE_FP_REPLY == 28, ++ "CTA_LAYERSCAPE_FP_* ABI shifted - re-check enum ctattr_type"); ++ +/* NXP ASK: Comcerto fast path parsing */ +static int +nfct_parse_comcerto_fp_attr_cb(const struct nlattr *attr, void *data) -- 2.47.3