Skip to contentSkip to conversation

cache: Reduce caching when terse listing a table

PATCH New Phil Sutter 1 participant 1 message Feb 8, 2024 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 cache: Reduce caching when terse listing a table

If user specified --terse, set NFT_CACHE_TERSE bit.

---
 src/cache.c | 2 ++
 1 file changed, 2 insertions(+)
src/cache.c +2 -0
index 97f50ccaf6ba1..d642c0985736a 100644
@@ -212,6 +212,8 @@ static unsigned int evaluate_cache_list(struct nft_ctx *nft, struct cmd *cmd,
 			filter->list.table = cmd->handle.table.name;
 		}
 		flags |= NFT_CACHE_FULL;
+		if (nft_output_terse(&nft->output))
+			flags |= NFT_CACHE_TERSE;
 		break;
 	case CMD_OBJ_CHAIN:
 		if (filter && cmd->handle.chain.name) {
Signature · 1 line
2.43.0