fw3_ipt_set_policy(struct fw3_ipt_handle *h, const char *chain,
enum fw3_flag policy)
{
+ if (fw3_pr_debug)
+ printf("-P %s %s\n", chain, fw3_flag_names[policy]);
+
if (h->family == FW3_FAMILY_V6)
ip6tc_set_policy(chain, fw3_flag_names[policy], NULL, h->handle);
else
fw3_print_zone_rules(handle, cfg_state, false);
fw3_print_default_tail_rules(handle, cfg_state, false);
- fw3_ipt_commit(handle);
+ if (!print_rules)
+ fw3_ipt_commit(handle);
}
//fw3_print_includes(cfg_state, family, false);
cfg_state->disable_ipsets = true;
print_rules = true;
+ fw3_pr_debug = true;
rv = start();
}