From 81c51fc1ab699fb6e417ada77221657ca34efd0b Mon Sep 17 00:00:00 2001 From: Eric Jallot Date: Wed, 30 Oct 2019 18:06:19 +0100 Subject: src: flowtable: add support for named flowtable listing This patch allows you to dump a named flowtable. # nft list flowtable inet t f table inet t { flowtable f { hook ingress priority filter + 10 devices = { eth0, eth1 } } } Also: libnftables-json.adoc: fix missing quotes. Fixes: db0697ce7f60 ("src: support for flowtable listing") Fixes: 872f373dc50f ("doc: Add JSON schema documentation") Signed-off-by: Eric Jallot Signed-off-by: Pablo Neira Ayuso --- src/parser_json.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/parser_json.c') diff --git a/src/parser_json.c b/src/parser_json.c index a9bcb84f..3b86a0ae 100644 --- a/src/parser_json.c +++ b/src/parser_json.c @@ -2967,7 +2967,7 @@ static struct cmd *json_parse_cmd_add_flowtable(struct json_ctx *ctx, if (json_unpack_err(ctx, root, "{s:s, s:s, s:s}", "family", &family, "table", &h.table.name, - "name", &h.flowtable)) + "name", &h.flowtable.name)) return NULL; if (parse_family(family, &h.family)) { @@ -2975,7 +2975,7 @@ static struct cmd *json_parse_cmd_add_flowtable(struct json_ctx *ctx, return NULL; } h.table.name = xstrdup(h.table.name); - h.flowtable = xstrdup(h.flowtable); + h.flowtable.name = xstrdup(h.flowtable.name); if (op == CMD_DELETE) return cmd_alloc(op, cmd_obj, &h, int_loc, NULL); -- cgit v1.2.3