<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#c2">Comment # 2</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:elise.lennion@gmail.com" title="Elise Lennion <elise.lennion@gmail.com>"> <span class="fn">Elise Lennion</span></a>
</span></b>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>