diff options
author | Phil Sutter <phil@nwl.cc> | 2018-06-01 17:32:10 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-06-03 11:47:22 +0200 |
commit | 6d79096aea854409a86a1854dcd3c52d5ed533f6 (patch) | |
tree | e9a93ba6c536ba865604a5192e3d11af1bc47790 | |
parent | baba63c3f69413dd74a69e3b2cbcbfa21ddddd5b (diff) |
JSON: Fix replace command parser
This was completely broken. Yet another indicator the JSON API part of
testsuite is insufficient.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | src/parser_json.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parser_json.c b/src/parser_json.c index 79715536..9b7aef4b 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, |