summaryrefslogtreecommitdiffstats
path: root/iptables/xtables-eb.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-08-04 13:10:19 +0200
committerFlorian Westphal <fw@strlen.de>2018-08-04 23:58:45 +0200
commit2ce9f65a374bad212899bc584d3e5f4698df6fc6 (patch)
tree471dc1f9624e772b9072c63ef54546453b0ad8e1 /iptables/xtables-eb.c
parentcd79556bfa15056f2a430e57993a2a64c734b3cf (diff)
xtables: Match verbose ip{,6}tables output with legacy
Legacy ip{,6}tables prints feedback for various commands if in verbose mode, make sure nft variants do the same. There is one difference, namely when checking a rule (-C command): Legacy ip{,6}tables print the rule in any case, nft variants don't in case the rule wasn't found. Changing this though would require to populate the nftnl_rule object just for printing, which is probably not feasible. 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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c
index b051e9f5..763d1ad9 100644
--- a/iptables/xtables-eb.c
+++ b/iptables/xtables-eb.c
@@ -856,7 +856,7 @@ int do_commandeb(struct nft_handle *h, int argc, char *argv[], char **table)
chain = argv[optind];
optind++;
}
- ret = nft_chain_user_del(h, chain, *table);
+ ret = nft_chain_user_del(h, chain, *table, 0);
break;
}
@@ -1317,9 +1317,10 @@ check_extension:
}
if (flags & OPT_ZERO) {
selected_chain = zerochain;
- ret = nft_chain_zero_counters(h, chain, *table);
+ ret = nft_chain_zero_counters(h, chain, *table,
+ flags & OPT_VERBOSE);
} else if (command == 'F') {
- ret = nft_rule_flush(h, chain, *table);
+ ret = nft_rule_flush(h, chain, *table, flags & OPT_VERBOSE);
} else if (command == 'A') {
ret = append_entry(h, chain, *table, &cs, 0,
flags&OPT_VERBOSE, true);