diff options
author | Phil Sutter <phil@nwl.cc> | 2019-09-24 16:57:24 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2019-09-30 08:12:36 +0200 |
commit | 3e450a6cc2325f4481dc86f074774dcdfd4947c3 (patch) | |
tree | 7f34d5f693d955f9876fc9e60b1d6f003bea1520 | |
parent | 760b35b46e4cc3aabe9214027959266df23a0122 (diff) | |
download | platform_external_iptables-3e450a6cc2325f4481dc86f074774dcdfd4947c3.tar.gz platform_external_iptables-3e450a6cc2325f4481dc86f074774dcdfd4947c3.tar.bz2 platform_external_iptables-3e450a6cc2325f4481dc86f074774dcdfd4947c3.zip |
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>
-rw-r--r-- | iptables/nft.c | 3 |
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; } |