src: fix flush chain cache flag
PATCH 1/1 src: fix flush chain cache flag
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 <[email protected]>
--- src/cache.c | 3 +++ 1 file changed, 3 insertions(+)
src/cache.c +3 -0
@@ -71,6 +71,9 @@ static unsigned int evaluate_cache_flush(struct cmd *cmd, unsigned int flags)case CMD_OBJ_METER : flags |=NFT_CACHE_SET ;break ; +case CMD_OBJ_CHAIN : + flags |=NFT_CACHE_CHAIN ; +break ;case CMD_OBJ_RULESET : flags |=NFT_CACHE_FLUSHED ;break ;
Signature · 1 line
2.11.0