From cf3e9100eedce518e42dfb6933c7871d041a7d18 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 23 Jul 2020 14:15:53 +0200 Subject: iptables: replace libnftnl table list by linux list This patch removes the libnftnl table list by linux list. This comes with an extra memory allocation to store the nft_table object. Probably, there is no need to cache the entire nftnl_table in the near future. Signed-off-by: Pablo Neira Ayuso --- iptables/nft-cache.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'iptables/nft-cache.h') diff --git a/iptables/nft-cache.h b/iptables/nft-cache.h index f4291180..aeab4bde 100644 --- a/iptables/nft-cache.h +++ b/iptables/nft-cache.h @@ -1,6 +1,8 @@ #ifndef _NFT_CACHE_H_ #define _NFT_CACHE_H_ +#include + struct nft_handle; struct nft_cmd; @@ -17,6 +19,12 @@ 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 nftnl_table_list *nftnl_table_list_get(struct nft_handle *h); +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_ */ -- cgit v1.2.3