path: root/iptables/nft-cache.c
diff options
authorPhil Sutter <>2019-10-07 13:49:08 +0200
committerPhil Sutter <>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 <> Acked-by: Pablo Neira Ayuso <>
Diffstat (limited to 'iptables/nft-cache.c')
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;