]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
json: fix 'add flowtable' command
authorAlex Forster <aforster@cloudflare.com>
Fri, 2 Dec 2022 03:35:01 +0000 (21:35 -0600)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 2 Dec 2022 12:55:33 +0000 (13:55 +0100)
In `json_parse_cmd_add_flowtable`, the format arguments passed to `json_unpack` are incorrect: the object key name ("dev") is not provided.

Fixes: da6cb40177da ("parser_json: permit empty device list")
Signed-off-by: Alex Forster <aforster@cloudflare.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/parser_json.c

index 76c268f85720254350ec86337c4425f7db546944..aa00e9ecd65ca736f123496c0079623a2371b994 100644 (file)
@@ -3253,7 +3253,7 @@ static struct cmd *json_parse_cmd_add_flowtable(struct json_ctx *ctx,
                return NULL;
        }
 
-       json_unpack(root, "{s:o}", &devs);
+       json_unpack(root, "{s:o}", "dev", &devs);
 
        hookstr = chain_hookname_lookup(hook);
        if (!hookstr) {