summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
authorPablo M. Bermudo Garay <pablombg@gmail.com>2016-05-31 12:37:07 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-05-31 12:42:13 +0200
commitabbb6a0dd4c8e39944bb4655c00945e3d24f2e60 (patch)
treee049f92bb7b98dfa218eda2b9b6f14506238abf2 /src/rule.c
parent69da3095ea38b42e068bab063b046a5016409d6a (diff)
src: add support for display maps content
This commit adds a new command that displays the definition of a single map: # nft list map [family] <table> <map> If no family is specified, ip is assumed. Example: # nft list map ip6 filter test table ip6 filter { map test { type ipv6_addr : inet_service elements = { 2001:db8::ff00:42:8329 : http} } } Signed-off-by: Pablo M. Bermudo Garay <pablombg@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rule.c b/src/rule.c
index 38fd6645..14e57f29 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -1222,6 +1222,8 @@ static int do_command_list(struct netlink_ctx *ctx, struct cmd *cmd)
return do_list_set(ctx, cmd, table);
case CMD_OBJ_MAPS:
return do_list_sets(ctx, cmd);
+ case CMD_OBJ_MAP:
+ return do_list_set(ctx, cmd, table);
default:
BUG("invalid command object type %u\n", cmd->obj);
}