* [PATCH nft] netlink_delinearize: prefer ct event set foo,bar over 'set foo|bar'
@ 2017-06-07 15:16 Florian Westphal
2017-06-07 15:24 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Florian Westphal @ 2017-06-07 15:16 UTC (permalink / raw)
To: netfilter-devel; +Cc: Florian Westphal
Translate binop representation to a list-based one, so nft prints
"ct event destroy,new" instead of 'ct event destroy|new'.
Signed-off-by: Florian Westphal <fw@strlen.de>
---
src/netlink_delinearize.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c
index b355eff47222..3ee07c0a1306 100644
--- a/src/netlink_delinearize.c
+++ b/src/netlink_delinearize.c
@@ -2205,8 +2205,13 @@ static void rule_parse_postprocess(struct netlink_parse_ctx *ctx, struct rule *r
expr_postprocess(&rctx, &stmt->meta.expr);
break;
case STMT_CT:
- if (stmt->ct.expr != NULL)
+ if (stmt->ct.expr != NULL) {
expr_postprocess(&rctx, &stmt->ct.expr);
+
+ if (stmt->ct.expr->ops->type == EXPR_BINOP)
+ stmt->ct.expr = binop_tree_to_list(NULL,
+ stmt->ct.expr);
+ }
break;
case STMT_NAT:
if (stmt->nat.addr != NULL)
--
2.13.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH nft] netlink_delinearize: prefer ct event set foo,bar over 'set foo|bar'
2017-06-07 15:16 [PATCH nft] netlink_delinearize: prefer ct event set foo,bar over 'set foo|bar' Florian Westphal
@ 2017-06-07 15:24 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2017-06-07 15:24 UTC (permalink / raw)
To: Florian Westphal; +Cc: netfilter-devel
On Wed, Jun 07, 2017 at 05:16:47PM +0200, Florian Westphal wrote:
> Translate binop representation to a list-based one, so nft prints
> "ct event destroy,new" instead of 'ct event destroy|new'.
>
> Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Thanks Florian.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-07 15:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-07 15:16 [PATCH nft] netlink_delinearize: prefer ct event set foo,bar over 'set foo|bar' Florian Westphal
2017-06-07 15:24 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).