]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: prepare set element accounting for async updates
authorPatrick McHardy <kaber@trash.net>
Sun, 5 Apr 2015 12:41:06 +0000 (14:41 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 8 Apr 2015 14:58:27 +0000 (16:58 +0200)
commit41c492473f2c1ca1c321e1e9fa9031e580f6b808
tree4daf53c5aef7eade635652cd37c023fbd4e75bc1
parent0d3fe011901ddae8f576c3085b895bc2bd41b1c1
netfilter: nf_tables: prepare set element accounting for async updates

Use atomic operations for the element count to avoid races with async
updates.

To properly handle the transactional semantics during netlink updates,
deleted but not yet committed elements are accounted for seperately and
are treated as being already removed. This means for the duration of
a netlink transaction, the limit might be exceeded by the amount of
elements deleted. Set implementations must be prepared to handle this.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_tables.h
net/netfilter/nf_tables_api.c
net/netfilter/nft_hash.c