Message ID | 20151008092724.23737.63936.stgit@r2d2.cica.es |
---|---|
State | Accepted |
Delegated to: | Pablo Neira |
Headers | show |
On Thu, Oct 08, 2015 at 11:27:24AM +0200, Arturo Borrero Gonzalez wrote: > From: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> > > Several fixes: > * handles are printed last > * simplify space games (an extra space was being printed) > * comments are shown with `nft monitor' as well (missing before this patch) Applied, thanks Arturo! -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/src/rule.c b/src/rule.c index 92b83f0..1bf0e03 100644 --- a/src/rule.c +++ b/src/rule.c @@ -383,6 +383,10 @@ void rule_print(const struct rule *rule) stmt->ops->print(stmt); printf(" "); } + + if (rule->handle.comment) + printf("comment \"%s\" ", rule->handle.comment); + if (handle_output > 0) printf("# handle %" PRIu64, rule->handle.handle); } @@ -622,10 +626,7 @@ static void chain_print(const struct chain *chain) list_for_each_entry(rule, &chain->rules, list) { printf("\t\t"); rule_print(rule); - if (rule->handle.comment) - printf(" comment \"%s\"\n", rule->handle.comment); - else - printf("\n"); + printf("\n"); } printf("\t}\n"); }