Skip to content

Commit 6ac86ac

Browse files
Florian Westphalummakynes
authored andcommitted
netfilter: nf_tables: hide clash bit from userspace
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 exclude the clash bit when dumping. Fixes: 7e5c6aa ("netfilter: nf_tables: add packets conntrack state to debug trace info") Link: https://lore.kernel.org/netfilter-devel/[email protected]/ Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 6dc2fae commit 6ac86ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/netfilter/nf_tables_trace.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ static int nf_trace_fill_ct_info(struct sk_buff *nlskb,
127127
if (nla_put_be32(nlskb, NFTA_TRACE_CT_ID, (__force __be32)id))
128128
return -1;
129129

130+
/* Kernel implementation detail, withhold this from userspace for now */
131+
status &= ~IPS_NAT_CLASH;
132+
130133
if (status && nla_put_be32(nlskb, NFTA_TRACE_CT_STATUS, htonl(status)))
131134
return -1;
132135
}

0 commit comments

Comments
 (0)