]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
cache: ensure evaluate_cache_list flags are set correctly
authorChris Arges <carges@cloudflare.com>
Tue, 26 Oct 2021 22:09:28 +0000 (00:09 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 26 Oct 2021 22:37:46 +0000 (00:37 +0200)
This change ensures that when listing rulesets with the terse flag that the
terse flag is maintained.

Fixes: 6bcd0d576a60 ("cache: unset NFT_CACHE_SETELEM with --terse listing")
Signed-off-by: Chris Arges <carges@cloudflare.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/cache.c

index f62c9b96f528311976abbe6817d91e2166166302..f66b415c038e5be0d81dbf0fa1883ce907f8e592 100644 (file)
@@ -166,6 +166,7 @@ static unsigned int evaluate_cache_list(struct nft_ctx *nft, struct cmd *cmd,
                        flags |= (NFT_CACHE_FULL & ~NFT_CACHE_SETELEM);
                else
                        flags |= NFT_CACHE_FULL;
+               break;
        default:
                flags |= NFT_CACHE_FULL;
                break;