]> git.ipfire.org Git - thirdparty/iptables.git/commit
xtables-restore: Fix verbose mode table flushing
authorPhil Sutter <phil@nwl.cc>
Tue, 12 May 2020 10:59:42 +0000 (12:59 +0200)
committerPhil Sutter <phil@nwl.cc>
Mon, 8 Jun 2020 22:16:34 +0000 (00:16 +0200)
commitb40b7d976fe144d14421bb441f55ffdc11a4b442
tree732401c5353525c314512c0d1ff608b7d168c7a3
parentd4ed0c741fc789bb09d977d74d30875fdd50d08b
xtables-restore: Fix verbose mode table flushing

When called with --verbose mode, iptables-nft-restore did not print
anything when flushing the table. Fix this by adding a "manual" mode to
nft_cmd_table_flush(), turning it into a wrapper around '-F' and '-X'
commands, which is exactly what iptables-legacy-restore does to flush a
table. This though requires a real cache, so don't set NFT_CL_FAKE then.

Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/nft-cmd.c
iptables/nft-cmd.h
iptables/nft-shared.h
iptables/tests/shell/testcases/ipt-restore/0014-verbose-restore_0 [new file with mode: 0755]
iptables/xtables-eb.c
iptables/xtables-restore.c