summaryrefslogtreecommitdiffstats
path: root/iptables/xtables-eb.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-08-02 17:05:32 +0200
committerFlorian Westphal <fw@strlen.de>2018-08-04 16:32:43 +0200
commit3319c6155c797b9d4ba66b3608468e18d518173a (patch)
treea48fd6a239ca55454fc7a15e08738ffe794552e2 /iptables/xtables-eb.c
parent3ec8aac5caa0acf0b4752089d731dcbd4e60174c (diff)
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 <phil@nwl.cc> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/xtables-eb.c')
-rw-r--r--iptables/xtables-eb.c4
1 files changed, 3 insertions, 1 deletions
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)