Skip to contentSkip to conversation

cache: disable NFT_CACHE_SETELEM_BIT on --terse listing only

PATCH New Pablo Neira Ayuso 1 participant 1 message Oct 27, 2021 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 cache: disable NFT_CACHE_SETELEM_BIT on --terse listing only

Instead of NFT_CACHE_SETELEM which also disables set dump.

Fixes 6bcd0d576a60 ("cache: unset NFT_CACHE_SETELEM with --terse listing")
---
 src/cache.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/cache.c +2 -2
index f66b415c038e..0cddd1e1cb48 100644
@@ -145,7 +145,7 @@ static unsigned int evaluate_cache_list(struct nft_ctx *nft, struct cmd *cmd,
 			filter->set = cmd->handle.set.name;
 		}
 		if (nft_output_terse(&nft->output))
-			flags |= (NFT_CACHE_FULL & ~NFT_CACHE_SETELEM);
+			flags |= (NFT_CACHE_FULL & ~NFT_CACHE_SETELEM_BIT);
 		else if (filter->table && filter->set)
 			flags |= NFT_CACHE_TABLE | NFT_CACHE_SET | NFT_CACHE_SETELEM;
 		else
@@ -163,7 +163,7 @@ static unsigned int evaluate_cache_list(struct nft_ctx *nft, struct cmd *cmd,
 		break;
 	case CMD_OBJ_RULESET:
 		if (nft_output_terse(&nft->output))
-			flags |= (NFT_CACHE_FULL & ~NFT_CACHE_SETELEM);
+			flags |= (NFT_CACHE_FULL & ~NFT_CACHE_SETELEM_BIT);
 		else
 			flags |= NFT_CACHE_FULL;
 		break;
Signature · 1 line
2.30.2