diff mbox series

[nft] cache: ensure evaluate_cache_list flags are set correctly

Message ID 4ffb3529-5f80-608b-497f-b0cb82a2dd3d@cloudflare.com
State Accepted
Delegated to: Pablo Neira
Headers show
Series [nft] cache: ensure evaluate_cache_list flags are set correctly | expand

Commit Message

Chris Arges Oct. 26, 2021, 7:56 p.m. UTC
This change ensures that when listing rulesets with the terse flag that the
terse flag is maintained.

Fixes: 6bcd0d57 ("cache: unset NFT_CACHE_SETELEM with --terse listing")
Signed-off-by: Chris Arges <carges@cloudflare.com>
---
  src/cache.c | 1 +
  1 file changed, 1 insertion(+)

Comments

Pablo Neira Ayuso Oct. 27, 2021, 9:10 a.m. UTC | #1
On Tue, Oct 26, 2021 at 02:56:04PM -0500, Chris Arges wrote:
> This change ensures that when listing rulesets with the terse flag that the
> terse flag is maintained.

Applied
diff mbox series

Patch

diff --git a/src/cache.c b/src/cache.c
index c602f93a..bc90233f 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -164,6 +164,7 @@  static unsigned int evaluate_cache_list(struct nft_ctx *nft, struct cmd *cmd,
  			flags |= (NFT_CACHE_FULL & ~NFT_CACHE_SETELEM) | NFT_CACHE_REFRESH;
  		else
  			flags |= NFT_CACHE_FULL | NFT_CACHE_REFRESH;
+		break;
  	default:
  		flags |= NFT_CACHE_FULL | NFT_CACHE_REFRESH;
  		break;