[PATCH nft 5/5] cache: position does not require full cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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")
Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 src/cache.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/cache.c b/src/cache.c
index db7dfd96081d..3f1324a2f98b 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:
-- 
2.30.2





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux