From 3e450a6cc2325f4481dc86f074774dcdfd4947c3 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 24 Sep 2019 16:57:24 +0200 Subject: 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 --- iptables/nft.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'iptables') 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; } -- cgit v1.2.3