From 3319c6155c797b9d4ba66b3608468e18d518173a Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 2 Aug 2018 17:05:32 +0200 Subject: ebtables: Support --init-table command This effectively flushes all built-in chains and removes user-defined ones. Since compat layer takes care of built-in table/chain creation, it is sufficient to just drop the relevant table. Signed-off-by: Phil Sutter Signed-off-by: Florian Westphal --- iptables/xtables-eb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'iptables') diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c index e6a17a00..b051e9f5 100644 --- a/iptables/xtables-eb.c +++ b/iptables/xtables-eb.c @@ -1169,7 +1169,9 @@ print_zero: break;*/ /*case 7 :*/ /* atomic-init */ /*case 10:*/ /* atomic-save */ - /*case 11:*/ /* init-table */ + case 11: /* init-table */ + nft_table_flush(h, *table); + return 1; /* replace->command = c; if (OPT_COMMANDS) -- cgit v1.2.3