<html>
<head>
<base href="https://bugzilla.netfilter.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - set: Can't add elements after flushing a full set with size description"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1114#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - set: Can't add elements after flushing a full set with size description"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1114">bug 1114</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>(In reply to Elise Lennion from <a href="show_bug.cgi?id=1114#c2">comment #2</a>)
<span class="quote">> I had this patch applied and the problem still persists here.
>
> The behaviour looks like the number of elements in a set isn't decreased
> after flushing a set, even when all elements are different:
>
> $ sudo nft add table x
> $ sudo nft add set x s {type ipv4_addr\; size 2\;}
> $ sudo nft add element x s {1.1.1.1}
> $ sudo nft flush set x s
> $ sudo nft add element x s {1.1.1.2}
> $ sudo nft add element x s {1.1.1.3}
>
> <cmdline>:1:1-26: Error: Could not process rule: Too many open files in
> system
> add element x s {1.1.1.3}
> ^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> If I delete the elements using 'delete' then it works as expected:
>
> $ sudo nft add table x
> $ sudo nft add set x s {type ipv4_addr\; size 2\;}
> $ sudo nft add element x s {1.1.1.1}
> $ sudo nft delete element x s {1.1.1.1}
> $ sudo nft add element x s {1.1.1.2}
> $ sudo nft add element x s {1.1.1.3}
> No error
>
> I tracked the number of elements in the set, when removing both by 'delete'
> and by 'flush', and the behaviour in nf_tables_commit() is the same, using
> both commands the number of elements is the expected.
>
> However, the command 'flush' decreases 'set->nelems' but doesn't make room
> for new elements, don't know what's wrong.</span >
OK, flushing is a different problem, although related yes.
<a href="http://patchwork.ozlabs.org/patch/717652/">http://patchwork.ozlabs.org/patch/717652/</a>
<a href="http://patchwork.ozlabs.org/patch/717653/">http://patchwork.ozlabs.org/patch/717653/</a>
You need these two patches to fix the set flush scenario.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>