From: Phil Sutter Date: Tue, 24 Sep 2019 14:57:24 +0000 (+0200) Subject: nft: Make nftnl_table_list_get() fetch only tables X-Git-Tag: v1.8.4~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3e450a6cc2325f4481dc86f074774dcdfd4947c3;p=thirdparty%2Fiptables.git nft: Make nftnl_table_list_get() fetch only tables No need for a full cache to serve the list of tables. Signed-off-by: Phil Sutter Acked-by: Florian Westphal --- diff --git a/iptables/nft.c b/iptables/nft.c index 0249cbbe..fde1b2a3 100644 --- a/iptables/nft.c +++ b/iptables/nft.c @@ -2046,7 +2046,8 @@ int nft_chain_user_rename(struct nft_handle *h,const char *chain, static struct nftnl_table_list *nftnl_table_list_get(struct nft_handle *h) { - nft_build_cache(h); + if (!h->cache->tables) + fetch_table_cache(h); return h->cache->tables; }