summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-11-18 17:25:36 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2021-11-18 20:26:00 +0100
commit8492878961248b4b53fa97383c7c1b15d7062947 (patch)
tree0868d24a5cf72444d49553cf90af2a1724b1568a /include
parent168e4e29e3b8bc9fc0563c8d5170575e868f5a21 (diff)
cache: do not skip populating anonymous set with -t
--terse does not apply to anonymous set, add a NFT_CACHE_TERSE bit to skip named sets only. Moreover, prioritize specific listing filter over --terse to avoid a bogus: netlink: Error: Unknown set '__set0' in lookup expression when invoking: # nft -ta list set inet filter example Extend existing test to improve coverage. Fixes: 9628d52e46ac ("cache: disable NFT_CACHE_SETELEM_BIT on --terse listing only") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/cache.h b/include/cache.h
index e5c509e8..3a9a5e81 100644
--- a/include/cache.h
+++ b/include/cache.h
@@ -32,6 +32,7 @@ enum cache_level_flags {
NFT_CACHE_CHAIN_BIT |
NFT_CACHE_RULE_BIT,
NFT_CACHE_FULL = __NFT_CACHE_MAX_BIT - 1,
+ NFT_CACHE_TERSE = (1 << 27),
NFT_CACHE_SETELEM_MAYBE = (1 << 28),
NFT_CACHE_REFRESH = (1 << 29),
NFT_CACHE_UPDATE = (1 << 30),