From b5cb6e631c828bdcd0715bc1ea94f9e753582b9d Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Mon, 7 Oct 2019 13:49:08 +0200 Subject: 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 --- iptables/nft-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iptables/nft-cache.c') 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; } -- cgit v1.2.3