]> git.ipfire.org Git - thirdparty/iptables.git/commit
iptables-restore: Support for extra debug output
authorPhil Sutter <phil@nwl.cc>
Fri, 28 Jan 2022 14:32:10 +0000 (15:32 +0100)
committerPhil Sutter <phil@nwl.cc>
Fri, 4 Feb 2022 08:49:23 +0000 (09:49 +0100)
commit17ed253f9dd401d7b83b81f5db93411bee592a40
tree2b953d3422b0d705678746b329b2c7765176ba6e
parenta761a026c60d4ce4e8f9a79b6e51ddc57fe97e1a
iptables-restore: Support for extra debug output

Treat --verbose just like iptables itself, increasing debug level with
number of invocations.

To propagate the level into do_command() callback, insert virtual '-v'
flags into rule lines.

The only downside of this is that simple verbose output is changed and
now also prints the rules as they are added - which would be useful if
the lines contained the chain they apply to.

Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/iptables-restore.8.in
iptables/iptables-restore.c
iptables/tests/shell/testcases/ipt-restore/0014-verbose-restore_0
iptables/xtables-restore.c