[Bug 1717] Listing a set may or may not show the size of a set
bugzilla-daemon at netfilter.org
bugzilla-daemon at netfilter.org
Wed Oct 25 13:39:07 CEST 2023
https://bugzilla.netfilter.org/show_bug.cgi?id=1717
--- Comment #1 from Pablo Neira Ayuso <pablo at netfilter.org> ---
Currently, size is set to 65535 if the set is dynamic AND it is used by the
ruleset.
I have a kernel patch here that I plan to test and then submit:
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 29c651804cb2..49c068d9b209 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -4998,6 +4998,9 @@ static int nf_tables_newset(struct sk_buff *skb, const
struct nfnl_info *info,
return -EINVAL;
}
+ if (flags & NFT_SET_EVAL && !desc.size)
+ desc.size = 0xffff;
+
if (nla[NFTA_SET_EXPR] || nla[NFTA_SET_EXPRESSIONS])
desc.expr = true;
This sets on the cap earlier, by the time the dynamic set is created.
--
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20231025/9eca4c51/attachment-0001.html>
More information about the netfilter-buglog
mailing list