]> git.ipfire.org Git - thirdparty/nftables.git/commit
evaluate: Update cache on flush ruleset
authorAnatole Denis <anatole@rezel.net>
Thu, 1 Dec 2016 10:50:17 +0000 (11:50 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 1 Dec 2016 11:31:00 +0000 (12:31 +0100)
commit530a82a72d157fbe297be62c9317649d63390c7b
tree833d2f9731df5b4daa4d86cdff9b02ad4f32beb6
parent7988e426eb7b12d1f266ff47e6704541585f3b46
evaluate: Update cache on flush ruleset

After a flush, the cache should be empty, otherwise the cache and the expected
state are desynced, causing unwarranted errors. See
tests/shell/testcases/cache/0002_interval_0.

`flush table` and `flush chain` don't empty sets or destroy chains, so the cache
does not need an update in those cases, since only chain names and set contents
are held in cache for commands other than "list"

Reported-by: Leon Merten Lohse <leon@green-side.de>
Signed-off-by: Anatole Denis <anatole@rezel.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/evaluate.c