Commit 34a20645d54fa enabled cache updates depending on command causing
it. As a side-effect, this disabled measures in cache_flush() preventing
a later cache update. Re-establish this by setting cache->cmd in
addition to cache->genid after dropping cache entries.

Fixes: 34a20645d54fa ("src: update cache if cmd is more specific")
Signed-off-by: Phil Sutter <[email protected]>
---
 src/rule.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/rule.c b/src/rule.c
index 4f015fc5354b7..6bb8b34202b4b 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -365,6 +365,7 @@ void cache_flush(struct nft_ctx *nft, enum cmd_ops cmd, 
struct list_head *msgs)
 
        __cache_flush(&cache->list);
        cache->genid = mnl_genid_get(&ctx);
+       cache->cmd = CMD_LIST;
 }
 
 void cache_release(struct nft_cache *cache)
-- 
2.21.0

Reply via email to