diff mbox series

[nft,1/5] cache: rule by index requires full cache

Message ID 20240815113712.1266545-2-pablo@netfilter.org
State Accepted
Headers show
Series relax cache requirements, speed up incremental updates | expand

Commit Message

Pablo Neira Ayuso Aug. 15, 2024, 11:37 a.m. UTC
In preparation for on-demand cache population with errors, set on
NFT_CACHE_FULL if rule index is used since this requires a full cache
with rules.

This is not a fix, follow up patches relax cache requirements, add
this patch in first place to make sure index does not break.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 src/cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/cache.c b/src/cache.c
index e88cbae2ad95..42e60dfa1286 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -68,7 +68,7 @@  static unsigned int evaluate_cache_add(struct cmd *cmd, unsigned int flags)
 
 		if (cmd->handle.index.id ||
 		    cmd->handle.position.id)
-			flags |= NFT_CACHE_RULE | NFT_CACHE_UPDATE;
+			flags |= NFT_CACHE_FULL | NFT_CACHE_UPDATE;
 		break;
 	default:
 		break;