[Bug 1114] set: Can't add elements after flushing a full set with size description

bugzilla-daemon at netfilter.org bugzilla-daemon at netfilter.org
Thu Jan 19 22:57:50 CET 2017


https://bugzilla.netfilter.org/show_bug.cgi?id=1114

--- Comment #2 from Elise Lennion <elise.lennion at gmail.com> ---
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.

-- 
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/20170119/6b2fd323/attachment.html>


More information about the netfilter-buglog mailing list