aboutsummaryrefslogtreecommitdiff
path: root/iptables/nft-cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'iptables/nft-cmd.c')
-rw-r--r--iptables/nft-cmd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/iptables/nft-cmd.c b/iptables/nft-cmd.c
index 9c0901e7..5d33f1f0 100644
--- a/iptables/nft-cmd.c
+++ b/iptables/nft-cmd.c
@@ -311,10 +311,15 @@ int nft_cmd_chain_set(struct nft_handle *h, const char *table,
return 1;
}
-int nft_cmd_table_flush(struct nft_handle *h, const char *table)
+int nft_cmd_table_flush(struct nft_handle *h, const char *table, bool verbose)
{
struct nft_cmd *cmd;
+ if (verbose) {
+ return nft_cmd_rule_flush(h, NULL, table, verbose) &&
+ nft_cmd_chain_user_del(h, NULL, table, verbose);
+ }
+
cmd = nft_cmd_new(h, NFT_COMPAT_TABLE_FLUSH, table, NULL, NULL, -1,
false);
if (!cmd)
@@ -388,8 +393,3 @@ int ebt_cmd_user_chain_policy(struct nft_handle *h, const char *table,
return 1;
}
-
-void nft_cmd_table_new(struct nft_handle *h, const char *table)
-{
- nft_cmd_new(h, NFT_COMPAT_TABLE_NEW, table, NULL, NULL, -1, false);
-}