path: root/iptables/nft-cache.h
diff options
authorPhil Sutter <>2020-07-30 11:54:36 +0200
committerPhil Sutter <>2020-07-31 13:37:20 +0200
commit27d01216cf05eb0b49b6456137e01a44d4547796 (patch)
tree045bc6ac1f7ed2a7990863d59e4daf2b2821b347 /iptables/nft-cache.h
parentcf3e9100eedce518e42dfb6933c7871d041a7d18 (diff)
nft: Eliminate table list from cache
The full list of tables in kernel is not relevant, only those used by iptables-nft and for those, knowing if they exist or not is sufficient. For holding that information, the already existing 'table' array in nft_cache suits well. Consequently, nft_table_find() merely checks if the new 'exists' boolean is true or not and nft_for_each_table() iterates over the builtin_table array in nft_handle, additionally checking the boolean in cache for whether to skip the entry or not. Signed-off-by: Phil Sutter <>
Diffstat (limited to 'iptables/nft-cache.h')
1 files changed, 0 insertions, 9 deletions
diff --git a/iptables/nft-cache.h b/iptables/nft-cache.h
index aeab4bde..76f9fbb6 100644
--- a/iptables/nft-cache.h
+++ b/iptables/nft-cache.h
@@ -1,8 +1,6 @@
#ifndef _NFT_CACHE_H_
#define _NFT_CACHE_H_
-#include <libiptc/linux_list.h>
struct nft_handle;
struct nft_cmd;
@@ -19,12 +17,5 @@ struct nftnl_chain_list *
nft_chain_list_get(struct nft_handle *h, const char *table, const char *chain);
struct nftnl_set_list *
nft_set_list_get(struct nft_handle *h, const char *table, const char *set);
-struct list_head *nft_table_list_get(struct nft_handle *h);
-struct nft_table {
- struct list_head list;
- struct nftnl_table *nftnl;
#endif /* _NFT_CACHE_H_ */