summaryrefslogtreecommitdiffstats
path: root/iptables
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2019-09-24 16:57:24 +0200
committerPhil Sutter <phil@nwl.cc>2019-09-30 08:12:36 +0200
commit3e450a6cc2325f4481dc86f074774dcdfd4947c3 (patch)
tree7f34d5f693d955f9876fc9e60b1d6f003bea1520 /iptables
parent760b35b46e4cc3aabe9214027959266df23a0122 (diff)
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 <phil@nwl.cc> Acked-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables')
-rw-r--r--iptables/nft.c3
1 files changed, 2 insertions, 1 deletions
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;
}