summaryrefslogtreecommitdiffstats
path: root/iptables/nft-cache.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2019-10-07 13:49:08 +0200
committerPhil Sutter <phil@nwl.cc>2019-10-17 19:02:29 +0200
commitb5cb6e631c828bdcd0715bc1ea94f9e753582b9d (patch)
treef6c372fc877e246432683968cb205c34098ef4c9 /iptables/nft-cache.c
parent5b5c998da4bdb9e4f1d023e06c983b07c3703af0 (diff)
nft-cache: Fetch only chains in nft_chain_list_get()
The function is used to return the given table's chains, so fetching chain cache is enough. Add calls to nft_build_cache() in places where a rule cache is required. Signed-off-by: Phil Sutter <phil@nwl.cc> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/nft-cache.c')
-rw-r--r--iptables/nft-cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/iptables/nft-cache.c b/iptables/nft-cache.c
index 04f42e0f..22468d70 100644
--- a/iptables/nft-cache.c
+++ b/iptables/nft-cache.c
@@ -393,7 +393,7 @@ struct nftnl_chain_list *nft_chain_list_get(struct nft_handle *h,
if (!t)
return NULL;
- nft_build_cache(h);
+ __nft_build_cache(h, NFT_CL_CHAINS);
return h->cache->table[t->type].chains;
}