netfilter: nft_dynset: support for element deletion

This patch implements the delete operation from the ruleset.

It implements a new delete() function in nft_set_rhash. It is simpler
to use than the already existing remove(), because it only takes the set
and the key as arguments, whereas remove() expects a full
nft_set_elem structure.

Signed-off-by: Ander Juaristi <a@juaristi.eus>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
Ander Juaristi
2019-08-17 13:26:52 +02:00
committed by Pablo Neira Ayuso
parent 65af4a1074
commit d0a8d877da
4 changed files with 35 additions and 1 deletions

View File

@@ -636,6 +636,7 @@ enum nft_lookup_attributes {
enum nft_dynset_ops {
NFT_DYNSET_OP_ADD,
NFT_DYNSET_OP_UPDATE,
NFT_DYNSET_OP_DELETE,
};
enum nft_dynset_flags {