From ed30b9311d2bf3758463a353bf8a9dbb42a4e1cb Mon Sep 17 00:00:00 2001 From: Eric Garver Date: Wed, 1 Aug 2018 15:36:26 -0400 Subject: nft: don't print rule counters unless verbose Currently rule counters are always printed, but that's not the desired behavior. We should only print them with the verbose flag. This broke when the arguments of nft_rule_print_save() were changed to accept the format instead of a counters flag. Fixes: cdc78b1d6bd7 ("nft: convert rule into a command state structure") Signed-off-by: Eric Garver Signed-off-by: Florian Westphal --- .../tests/shell/testcases/ipt-save/0005iptables_0 | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 iptables/tests/shell/testcases/ipt-save/0005iptables_0 (limited to 'iptables/tests') diff --git a/iptables/tests/shell/testcases/ipt-save/0005iptables_0 b/iptables/tests/shell/testcases/ipt-save/0005iptables_0 new file mode 100755 index 00000000..d5eb76a7 --- /dev/null +++ b/iptables/tests/shell/testcases/ipt-save/0005iptables_0 @@ -0,0 +1,30 @@ +#!/bin/bash + +set -e + +tmpfile1=$(mktemp) +tmpfile2=$(mktemp) + +clean_tmpfile() +{ + rm -f "$tmpfile1" "$tmpfile2" +} + +trap clean_tmpfile EXIT + + +cat > $tmpfile1< $tmpfile2 + +diff -u $tmpfile1 $tmpfile2 + +rm -f $tmpfile1 $tmpfile2 -- cgit v1.2.3