]> git.ipfire.org Git - thirdparty/nftables.git/commit
mnl: add mnl_nft_setelem_batch_flush() and use it from netlink_flush_setelems()
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 20 Dec 2016 00:14:10 +0000 (01:14 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 20 Dec 2016 19:24:27 +0000 (20:24 +0100)
commit7c568680e2d904b5332e398a2a329ecdb94f897e
tree7276de2d45e7fb6dc0f5bedea2de116977e5ccc1
parent0e1824475e2e7aee09dd2d5c38fc4ebd4b7ab8bb
mnl: add mnl_nft_setelem_batch_flush() and use it from netlink_flush_setelems()

Commit 8bd99f2fca7e ("mnl: don't send empty set elements netlink message
to kernel") broke set flush because we still need to send the netlink
message with no elements to flush sets.

To avoid more whack-a-mole games, add a new explicit function
mnl_nft_setelem_batch_flush() that is used to request a set flush,
instead of reusing the one that allows us to explicitly delete given set
elements.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/mnl.h
src/mnl.c
src/netlink.c