% 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 <pablo@netfilter.org>
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);
}