[nft PATCH 5/7] JSON: Fix replace command parser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This was completely broken. Yet another indicator the JSON API part of
testsuite is insufficient.

Signed-off-by: Phil Sutter <phil@xxxxxx>
---
 src/parser_json.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/parser_json.c b/src/parser_json.c
index 7971553651f27..9b7aef4b498cc 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -2711,8 +2711,9 @@ static struct cmd *json_parse_cmd_replace(struct json_ctx *ctx,
 	struct rule *rule;
 	size_t index;
 
-	if (json_unpack_err(ctx, root, "{s:o}", "rule", &rule))
+	if (json_unpack_err(ctx, root, "{s:o}", "rule", &tmp))
 		return NULL;
+	root = tmp;
 
 	if (json_unpack_err(ctx, root, "{s:s, s:s, s:s, s:o}",
 			    "family", &family,
-- 
2.17.0

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux