diff options
author | Phil Sutter <phil@nwl.cc> | 2018-08-02 17:05:32 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2018-08-04 16:32:43 +0200 |
commit | 3319c6155c797b9d4ba66b3608468e18d518173a (patch) | |
tree | a48fd6a239ca55454fc7a15e08738ffe794552e2 | |
parent | 3ec8aac5caa0acf0b4752089d731dcbd4e60174c (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>
-rw-r--r-- | iptables/xtables-eb.c | 4 |
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) |