<html>
<head>
<base href="https://bugzilla.netfilter.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - The nft(8) manual does not explain how sets are sized"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1718#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - The nft(8) manual does not explain how sets are sized"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1718">bug 1718</a>
from <span class="vcard"><a class="email" href="mailto:pablo@netfilter.org" title="Pablo Neira Ayuso <pablo@netfilter.org>"> <span class="fn">Pablo Neira Ayuso</span></a>
</span></b>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>