diff options
author | Florian Westphal <fw@strlen.de> | 2020-02-24 01:03:20 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-02-24 10:58:04 +0100 |
commit | 1da9f9887cf1c35c190a703569e99e47e1cc4491 (patch) | |
tree | f783a83fa392eea123292a801b205d594547a037 | |
parent | 16db2440ae5a5d34590b883eea63a238178d6133 (diff) |
evaluate: process concat expressions when used as mapped-to expr
Needed to avoid triggering the 'dtype->size == 0' tests.
Evaluation will build a new concatenated type that holds the
size of the aggregate.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | src/evaluate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/evaluate.c b/src/evaluate.c index ae629abe..7a70eff9 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -3368,6 +3368,10 @@ static int set_evaluate(struct eval_ctx *ctx, struct set *set) return set_error(ctx, set, "map definition does not " "specify mapping data type"); + if (set->data->etype == EXPR_CONCAT && + expr_evaluate_concat(ctx, &set->data, false) < 0) + return -1; + if (set->data->len == 0 && set->data->dtype->type != TYPE_VERDICT) return set_key_data_error(ctx, set, set->data->dtype, type); |