]> git.ipfire.org Git - thirdparty/nftables.git/commit
cache: incorrect flush flag for table/chain
authorLaura Garcia Liebana <nevola@gmail.com>
Wed, 31 Jul 2019 11:27:46 +0000 (13:27 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 31 Jul 2019 12:44:46 +0000 (14:44 +0200)
commite8417f7bcbfe20524307557f8687bdd3a665f73e
tree2235deb2e5447cf281c92009ce7eee38b4b8ca52
parent88849ff15acaada4b0b76870ca48268236c6f30a
cache: incorrect flush flag for table/chain

After the new cache system, nft raises a table error flushing a chain in
a transaction.

 # nft "flush chain ip nftlb filter-newfarm ; \
    add rule ip nftlb filter-newfarm update \
    @persist-newfarm {  ip saddr : ct mark } ; \
    flush chain ip nftlb nat-newfarm"
 Error: No such file or directory
 flush chain ip nftlb filter-newfarm ; add rule ip nftlb (...)
                                                   ^^^^^

This patch sets the cache flag properly to save this case.

Fixes: 01e5c6f0ed031 ("src: add cache level flags")
Signed-off-by: Laura Garcia Liebana <nevola@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/cache.c
tests/shell/testcases/cache/0005_cache_chain_flush [new file with mode: 0755]
tests/shell/testcases/cache/0006_cache_table_flush [new file with mode: 0755]