summaryrefslogtreecommitdiffstats
path: root/src/parser_json.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser_json.c')
-rw-r--r--src/parser_json.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/parser_json.c b/src/parser_json.c
index 76c0a5cc..a45234ad 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -2580,7 +2580,10 @@ static struct cmd *json_parse_cmd_add_chain(struct json_ctx *ctx, json_t *root,
chain = chain_alloc(NULL);
chain->flags |= CHAIN_F_BASECHAIN;
chain->type = xstrdup(type);
- chain->priority.num = prio;
+ chain->priority.expr = constant_expr_alloc(int_loc, &integer_type,
+ BYTEORDER_HOST_ENDIAN,
+ sizeof(int) * BITS_PER_BYTE,
+ &prio);
chain->hookstr = chain_hookname_lookup(hookstr);
if (!chain->hookstr) {
json_error(ctx, "Invalid chain hook '%s'.", hookstr);
@@ -2947,7 +2950,10 @@ static struct cmd *json_parse_cmd_add_flowtable(struct json_ctx *ctx,
flowtable = flowtable_alloc(int_loc);
flowtable->hookstr = hookstr;
- flowtable->priority.num = prio;
+ flowtable->priority.expr =
+ constant_expr_alloc(int_loc, &integer_type,
+ BYTEORDER_HOST_ENDIAN,
+ sizeof(int) * BITS_PER_BYTE, &prio);
flowtable->dev_expr = json_parse_flowtable_devs(ctx, devs);
if (!flowtable->dev_expr) {