diff options
author | Phil Sutter <phil@nwl.cc> | 2018-06-01 17:32:09 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-06-03 11:47:22 +0200 |
commit | baba63c3f69413dd74a69e3b2cbcbfa21ddddd5b (patch) | |
tree | 4a019eb009df066c7070f196885220ba469a1cca /src/parser_json.c | |
parent | d1057a5feb5fde589c6505cf94f89fbdce91351b (diff) |
JSON: Fix add rule with index
This was missed by commit fb557b5546084 ("JSON: Sort out rule position
and handles in general"): When adding a rule, the parser would still
expect "pos" property instead of "index".
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/parser_json.c')
-rw-r--r-- | src/parser_json.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser_json.c b/src/parser_json.c index 394e5039..79715536 100644 --- a/src/parser_json.c +++ b/src/parser_json.c @@ -2220,7 +2220,7 @@ static struct cmd *json_parse_cmd_add_rule(struct json_ctx *ctx, json_t *root, return NULL; } - json_unpack(root, "{s:i}", "pos", &h.position.id); + json_unpack(root, "{s:i}", "index", &h.index.id); rule = rule_alloc(int_loc, NULL); |