summaryrefslogtreecommitdiffstats
path: root/src/parser_json.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2020-03-31 13:36:16 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2020-03-31 13:50:59 +0200
commit673d82af234e24ef841e8409426d5f082f9ea59e (patch)
tree97c79a625b4302ea89d046eea63c1f42a5ad2366 /src/parser_json.c
parentd6ac64f92dfca5da4d07989114a4aa46e1322453 (diff)
rule: add hook_spec
Store location of chain hook definition. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/parser_json.c')
-rw-r--r--src/parser_json.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parser_json.c b/src/parser_json.c
index d158db78..a1765027 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -2628,8 +2628,8 @@ static struct cmd *json_parse_cmd_add_chain(struct json_ctx *ctx, json_t *root,
BYTEORDER_HOST_ENDIAN,
sizeof(int) * BITS_PER_BYTE,
&prio);
- chain->hookstr = chain_hookname_lookup(hookstr);
- if (!chain->hookstr) {
+ chain->hook.name = chain_hookname_lookup(hookstr);
+ if (!chain->hook.name) {
json_error(ctx, "Invalid chain hook '%s'.", hookstr);
chain_free(chain);
return NULL;
@@ -3017,7 +3017,7 @@ static struct cmd *json_parse_cmd_add_flowtable(struct json_ctx *ctx,
}
flowtable = flowtable_alloc(int_loc);
- flowtable->hookstr = hookstr;
+ flowtable->hook.name = hookstr;
flowtable->priority.expr =
constant_expr_alloc(int_loc, &integer_type,
BYTEORDER_HOST_ENDIAN,