From: Pablo Neira Ayuso Date: Thu, 15 Aug 2024 10:34:08 +0000 (+0200) Subject: cache: rule by index requires full cache X-Git-Tag: v1.1.1~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=161beaeacd2e5218d66febc3db825bf6a27119c5;p=thirdparty%2Fnftables.git cache: rule by index requires full cache 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, index is already fetching a full cache before this patch. But follow up patches relax cache requirements, so add this patch in first place to make sure index does not break. Tested-by: Eric Garver Signed-off-by: Pablo Neira Ayuso --- diff --git a/src/cache.c b/src/cache.c index e88cbae2..42e60dfa 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;