From a761a026c60d4ce4e8f9a79b6e51ddc57fe97e1a Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 28 Jan 2022 19:35:54 +0100 Subject: nft: Use verbose flag to toggle debug output Copy legacy iptables' behaviour, printing debug output if verbose flag is given more than once. Since nft debug output applies to netlink messages which are not created until nft_action() phase, carrying verbose value is non-trivial - introduce a field in struct nft_handle for that. Signed-off-by: Phil Sutter --- iptables/xtables.c | 1 + 1 file changed, 1 insertion(+) (limited to 'iptables/xtables.c') diff --git a/iptables/xtables.c b/iptables/xtables.c index 051d5c7b..c44b39ac 100644 --- a/iptables/xtables.c +++ b/iptables/xtables.c @@ -163,6 +163,7 @@ int do_commandx(struct nft_handle *h, int argc, char *argv[], char **table, h->ops->init_cs(&cs); do_parse(argc, argv, &p, &cs, &args); + h->verbose = p.verbose; if (!nft_table_builtin_find(h, p.table)) xtables_error(VERSION_PROBLEM, -- cgit v1.2.3