netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] json: fix 'add flowtable' command
@ 2022-12-02  3:35 Alex Forster
  2022-12-02 12:54 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Forster @ 2022-12-02  3:35 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Alex Forster, Florian Westphal

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")
Signed-off-by: Alex Forster <aforster@cloudflare.com>
Cc: Florian Westphal <fw@strlen.de>
---
 src/parser_json.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/parser_json.c b/src/parser_json.c
index 76c268f8..aa00e9ec 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -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) {
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] json: fix 'add flowtable' command
  2022-12-02  3:35 [PATCH] json: fix 'add flowtable' command Alex Forster
@ 2022-12-02 12:54 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2022-12-02 12:54 UTC (permalink / raw)
  To: Alex Forster; +Cc: netfilter-devel, Florian Westphal

On Thu, Dec 01, 2022 at 09:35:01PM -0600, Alex Forster wrote:
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-02 12:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-02  3:35 [PATCH] json: fix 'add flowtable' command Alex Forster
2022-12-02 12:54 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).