Skip to contentSkip to conversation

json: fix 'add flowtable' command

PATCH Applied Alex Forster 2 participants 2 messages Dec 2, 2022 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 json: fix 'add flowtable' command

In json_parse_cmd_add_flowtable, the format arguments passed to json_unpack are incorrect: the object key name ("dev") is not provided.

Fixes 586ad2103 ("parser_json: permit empty device list")
Cc Florian Westphal <[email protected]>
---
 src/parser_json.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/parser_json.c +1 -1
index 76c268f8..aa00e9ec 100644
@@ -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) {
Signature · 1 line
2.38.1
maintainer Applied
#1 lore raw
Quoted 1 line · Alex Forster

In json_parse_cmd_add_flowtable, the format arguments passed to json_unpack are incorrect: the object key name ("dev") is not provided.

Applied to nftables, thanks