]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: bump set->ndeact on set flush
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 23 Jan 2017 23:51:48 +0000 (00:51 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 24 Jan 2017 20:46:59 +0000 (21:46 +0100)
commit0948e4054ce23410dfbccc5c47242c3c2b51ee03
tree1938812d9d30876f127051fb5acba13b76cbb1c8
parent3139a7c4435428d4c9a252e2f77f9b6aa84945aa
netfilter: nf_tables: bump set->ndeact on set flush

Add missing set->ndeact update on each deactivated element from the set
flush path. Otherwise, sets with fixed size break after flush since
accounting breaks.

 # nft add set x y { type ipv4_addr\; size 2\; }
 # nft add element x y { 1.1.1.1 }
 # nft add element x y { 1.1.1.2 }
 # nft flush set x y
 # nft add element x y { 1.1.1.1 }
 <cmdline>:1:1-28: Error: Could not process rule: Too many open files in system

Fixes: 118974179f7f ("netfilter: nf_tables: support for set flushing")
Reported-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c