From 2ce9f65a374bad212899bc584d3e5f4698df6fc6 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Sat, 4 Aug 2018 13:10:19 +0200 Subject: 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 Signed-off-by: Florian Westphal --- iptables/nft.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'iptables/nft.h') diff --git a/iptables/nft.h b/iptables/nft.h index 6f58de25..5febb9f9 100644 --- a/iptables/nft.h +++ b/iptables/nft.h @@ -79,11 +79,11 @@ struct nftnl_chain_list *nft_chain_dump(struct nft_handle *h); struct nftnl_chain *nft_chain_list_find(struct nftnl_chain_list *list, const char *table, const char *chain); int nft_chain_save(struct nft_handle *h, struct nftnl_chain_list *list, const char *table); int nft_chain_user_add(struct nft_handle *h, const char *chain, const char *table); -int nft_chain_user_del(struct nft_handle *h, const char *chain, const char *table); +int nft_chain_user_del(struct nft_handle *h, const char *chain, const char *table, bool verbose); int nft_chain_user_flush(struct nft_handle *h, struct nftnl_chain_list *list, const char *chain, const char *table); int nft_chain_user_rename(struct nft_handle *h, const char *chain, const char *table, const char *newname); -int nft_chain_zero_counters(struct nft_handle *h, const char *chain, const char *table); +int nft_chain_zero_counters(struct nft_handle *h, const char *chain, const char *table, bool verbose); /* * Operations with rule-set. @@ -99,7 +99,7 @@ int nft_rule_replace(struct nft_handle *h, const char *chain, const char *table, int nft_rule_list(struct nft_handle *h, const char *chain, const char *table, int rulenum, unsigned int format); int nft_rule_list_save(struct nft_handle *h, const char *chain, const char *table, int rulenum, int counters); int nft_rule_save(struct nft_handle *h, const char *table, unsigned int format); -int nft_rule_flush(struct nft_handle *h, const char *chain, const char *table); +int nft_rule_flush(struct nft_handle *h, const char *chain, const char *table, bool verbose); int nft_rule_zero_counters(struct nft_handle *h, const char *chain, const char *table, int rulenum); /* -- cgit v1.2.3