From 734eed347ff1b648b57940af482452d09337282c Mon Sep 17 00:00:00 2001 From: Pablo Neira Date: Mon, 13 Jan 2014 13:39:16 +0100 Subject: expression: fix output of verdict maps % nft list table filter table ip filter { ... chain output { ... ip saddr map { 1.1.1.1 => accept} } } It displays 'map' instead of 'vmap'. Fix it by checking the mapping type in map_expr_print(). Signed-off-by: Pablo Neira Ayuso --- src/expression.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/expression.c') diff --git a/src/expression.c b/src/expression.c index 518f71c8..a12133c8 100644 --- a/src/expression.c +++ b/src/expression.c @@ -691,7 +691,11 @@ struct expr *mapping_expr_alloc(const struct location *loc, static void map_expr_print(const struct expr *expr) { expr_print(expr->map); - printf(" map "); + if (expr->mappings->ops->type == EXPR_SET_REF && + expr->mappings->set->datatype->type == TYPE_VERDICT) + printf(" vmap "); + else + printf(" map "); expr_print(expr->mappings); } -- cgit v1.2.3