From 673d82af234e24ef841e8409426d5f082f9ea59e Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 31 Mar 2020 13:36:16 +0200 Subject: rule: add hook_spec Store location of chain hook definition. Signed-off-by: Pablo Neira Ayuso --- src/parser_json.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/parser_json.c') 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, -- cgit v1.2.3