summaryrefslogtreecommitdiffstats
path: root/iptables/nft-cache.h
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2020-07-08 16:09:52 +0200
committerPhil Sutter <phil@nwl.cc>2020-12-21 18:33:21 +0100
commit09af1117340cfd1885eb2f0a7b522f2d85f66185 (patch)
treeee70d2ccf353dda4fcfe27e8c14dddee41272c0a /iptables/nft-cache.h
parente8d48d7b41ec09eb67f69a2bed04628870ec85c3 (diff)
nft: Implement nft_chain_foreach()
This is just a fancy wrapper around nftnl_chain_list_foreach() with the added benefit of detecting invalid table names or uninitialized chain lists. This in turn allows to drop the checks in flush_rule_cache() and ignore the return code of nft_chain_foreach() as it fails only if the dropped checks had failed, too. Since this wrapper does the chain list lookup by itself, use of nft_chain_list_get() shrinks down to a single place, namely inside nft_chain_find(). Therefore fold it into the latter. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/nft-cache.h')
-rw-r--r--iptables/nft-cache.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/iptables/nft-cache.h b/iptables/nft-cache.h
index d97f8de2..52ad2d39 100644
--- a/iptables/nft-cache.h
+++ b/iptables/nft-cache.h
@@ -16,8 +16,6 @@ void nft_cache_build(struct nft_handle *h);
int nft_cache_add_chain(struct nft_handle *h, const struct builtin_table *t,
struct nftnl_chain *c);
-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);