]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nft_hash: support deletion of inactive elements
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 20 Jun 2016 22:12:26 +0000 (00:12 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 24 Jun 2016 09:03:27 +0000 (11:03 +0200)
commitda2101da28f850de59f6f3ed800df0863a3497ee
tree7e7be64d7f5e73d182327df710430ec37e5ee18b
parent05c9b191e25db3465355edcea86be80a6b9e3e4e
netfilter: nft_hash: support deletion of inactive elements

New elements are inactive in the preparation phase, and its
NFT_SET_ELEM_BUSY_MASK flag is set on.

This busy flag doesn't allow us to delete it from the same transaction,
following a sequence like:

begin transaction
add element X
delete element X
end transaction

This sequence is valid and may be triggered by robots. To resolve this
problem, allow deactivating elements that are active in the current
generation (ie. those that has been just added in this batch).

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_hash.c