Fetch table, set and set elements only for set listing commands, e.g.
nft list set inet filter ipv4_bogons.
Fixes: 635ee1cad8aa ("cache: filter out sets and maps that are not requested")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
}
if (nft_output_terse(&nft->output))
flags |= (NFT_CACHE_FULL & ~NFT_CACHE_SETELEM);
+ else if (filter->table && filter->set)
+ flags |= NFT_CACHE_TABLE | NFT_CACHE_SET | NFT_CACHE_SETELEM;
else
flags |= NFT_CACHE_FULL;
break;