From 09f0d47b213de944303a320a70bf57e143bfed62 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 4 May 2018 11:25:00 +0200 Subject: iptables-compat: do not fail on restore if user chain exists The following snippet fails if user chain FOO exists, but it should not fail: iptables-compat -F iptables-compat -N FOO iptables-compat-save > foo iptables-compat-restore < foo Reported-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- iptables/nft.h | 1 + 1 file changed, 1 insertion(+) (limited to 'iptables/nft.h') diff --git a/iptables/nft.h b/iptables/nft.h index aaf3cbe0..2d5c37e5 100644 --- a/iptables/nft.h +++ b/iptables/nft.h @@ -58,6 +58,7 @@ struct nftnl_chain_list; int nft_for_each_table(struct nft_handle *h, int (*func)(struct nft_handle *h, const char *tablename, bool counters), bool counters); bool nft_table_find(struct nft_handle *h, const char *tablename); int nft_table_purge_chains(struct nft_handle *h, const char *table, struct nftnl_chain_list *list); +int nft_table_flush(struct nft_handle *h, const char *table); /* * Operations with chains. -- cgit v1.2.3