diff mbox series

[nft,4/7] JSON: Fix add rule with index

Message ID 20180601153212.26614-5-phil@nwl.cc
State Accepted
Delegated to: Pablo Neira
Headers show
Series Review wildcard expression parsing and some more | expand

Commit Message

Phil Sutter June 1, 2018, 3:32 p.m. UTC
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>
---
 src/parser_json.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/parser_json.c b/src/parser_json.c
index 394e5039a4476..7971553651f27 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);