[nft PATCH] cache: Reduce caching when terse listing a table

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

 



If user specified --terse, set NFT_CACHE_TERSE bit.

Reported-by: anton.khazan@xxxxxxxxx
Link: https://bugzilla.netfilter.org/show_bug.cgi?id=1735
Signed-off-by: Phil Sutter <phil@xxxxxx>
---
 src/cache.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/cache.c b/src/cache.c
index 97f50ccaf6ba1..d642c0985736a 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -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) {
-- 
2.43.0





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

  Powered by Linux