* [PATCH nf] netfilter: nf_tables: hide clash bit from userspace
@ 2025-07-07 20:32 Florian Westphal
2025-07-14 13:52 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Florian Westphal @ 2025-07-07 20:32 UTC (permalink / raw)
To: netfilter-devel; +Cc: Florian Westphal
Its a kernel implementation detail, at least at this time:
We can later decide to revert this patch if there is a compelling
reason, but then we should also remove the ifdef that prevents exposure
of ip_conntrack_status enum IPS_NAT_CLASH value in the uapi header.
Clash entries are not included in dumps (true for both old /proc
and ctnetlink) either. So for now exlude the clash bit when dumping.
Fixes: 7e5c6aa67e6f ("netfilter: nf_tables: add packets conntrack state to debug trace info")
Link: https://lore.kernel.org/netfilter-devel/aGwf3dCggwBlRKKC@strlen.de/
Signed-off-by: Florian Westphal <fw@strlen.de>
---
net/netfilter/nf_tables_trace.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/netfilter/nf_tables_trace.c b/net/netfilter/nf_tables_trace.c
index ae3fe87195ab..a88abae5a9de 100644
--- a/net/netfilter/nf_tables_trace.c
+++ b/net/netfilter/nf_tables_trace.c
@@ -127,6 +127,9 @@ static int nf_trace_fill_ct_info(struct sk_buff *nlskb,
if (nla_put_be32(nlskb, NFTA_TRACE_CT_ID, (__force __be32)id))
return -1;
+ /* Kernel implementation detail, withhold this from userspace for now */
+ status &= ~IPS_NAT_CLASH;
+
if (status && nla_put_be32(nlskb, NFTA_TRACE_CT_STATUS, htonl(status)))
return -1;
}
--
2.49.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH nf] netfilter: nf_tables: hide clash bit from userspace
2025-07-07 20:32 [PATCH nf] netfilter: nf_tables: hide clash bit from userspace Florian Westphal
@ 2025-07-14 13:52 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2025-07-14 13:52 UTC (permalink / raw)
To: Florian Westphal; +Cc: netfilter-devel
On Mon, Jul 07, 2025 at 10:32:44PM +0200, Florian Westphal wrote:
> Its a kernel implementation detail, at least at this time:
>
> We can later decide to revert this patch if there is a compelling
> reason, but then we should also remove the ifdef that prevents exposure
> of ip_conntrack_status enum IPS_NAT_CLASH value in the uapi header.
>
> Clash entries are not included in dumps (true for both old /proc
> and ctnetlink) either. So for now exlude the clash bit when dumping.
Applied to nf.git, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-14 13:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-07 20:32 [PATCH nf] netfilter: nf_tables: hide clash bit from userspace Florian Westphal
2025-07-14 13:52 ` Pablo Neira Ayuso
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.