From: Pablo Neira Ayuso Date: Thu, 29 Aug 2024 10:42:17 +0000 (+0200) Subject: cache: position does not require full cache X-Git-Tag: v1.1.1~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d414f756af9d638fe0c0002b2df31c8c17a15002;p=thirdparty%2Fnftables.git cache: position does not require full cache position refers to the rule handle, it has similar cache requirements as replace rule command, relax cache requirements. Commit e5382c0d08e3 ("src: Support intra-transaction rule references") uses position.id for index support which requires a full cache, but only in such case. Fixes: 01e5c6f0ed03 ("src: add cache level flags") Tested-by: Eric Garver Signed-off-by: Pablo Neira Ayuso --- diff --git a/src/cache.c b/src/cache.c index b738a633..c8ef1603 100644 --- a/src/cache.c +++ b/src/cache.c @@ -58,8 +58,7 @@ static unsigned int evaluate_cache_add(struct cmd *cmd, unsigned int flags) flags |= NFT_CACHE_TABLE | NFT_CACHE_SET; - if (cmd->handle.index.id || - cmd->handle.position.id) + if (cmd->handle.index.id) flags |= NFT_CACHE_FULL | NFT_CACHE_UPDATE; break; default: