From 407c54f712554d1055c43e8a7d731a765564c16b Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 6 Aug 2020 12:52:00 +0200 Subject: src: cache gets out of sync in interactive mode Since 94a945ffa81b ("libnftables: Get rid of explicit cache flushes"), the cache logic checks for the generation number to refresh the cache. This breaks interactive mode when listing stateful objects though. This patch adds a new flag to force a cache refresh when the user requests a ruleset listing. Signed-off-by: Pablo Neira Ayuso --- include/cache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/cache.h') diff --git a/include/cache.h b/include/cache.h index 86a7eff7..213a6eaf 100644 --- a/include/cache.h +++ b/include/cache.h @@ -30,6 +30,7 @@ enum cache_level_flags { NFT_CACHE_CHAIN_BIT | NFT_CACHE_RULE_BIT, NFT_CACHE_FULL = __NFT_CACHE_MAX_BIT - 1, + NFT_CACHE_REFRESH = (1 << 29), NFT_CACHE_UPDATE = (1 << 30), NFT_CACHE_FLUSHED = (1 << 31), }; -- cgit v1.2.3