]> git.ipfire.org Git - thirdparty/iptables.git/commit
nft: CMD_ZERO needs a rule cache
authorPhil Sutter <phil@nwl.cc>
Fri, 15 Nov 2019 09:47:24 +0000 (10:47 +0100)
committerPhil Sutter <phil@nwl.cc>
Fri, 15 Nov 2019 14:45:13 +0000 (15:45 +0100)
commit7084d0b6c95b11f03b3ae979fe30b6918cb26542
treed9371aa2bfbb26f013c374d3fea95b822a143900
parentbd2dc3e730669cc813cedfd0876f22f5083cae9a
nft: CMD_ZERO needs a rule cache

In order to zero rule counters, they have to be fetched from kernel. Fix
this for both standalone calls as well as xtables-restore --noflush.

Fixes: b5cb6e631c828 ("nft-cache: Fetch only chains in nft_chain_list_get()")
Fixes: 09cb517949e69 ("xtables-restore: Improve performance of --noflush operation")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: Florian Westphal <fw@strlen.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/nft.c
iptables/xtables-restore.c