summaryrefslogtreecommitdiffstats
path: root/src/evaluate.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2012-12-09 13:35:23 +0100
committerPatrick McHardy <kaber@trash.net>2012-12-09 14:55:32 +0100
commit1affe46773ea8ac6deacc8b1b126c7ad4708356f (patch)
tree2e30aa8a5a7b73f7a6707eb135709ef13a361fbb /src/evaluate.c
parenta64c860314779d95dc20834b5e8b314bfb9bac8e (diff)
sets: fix sets using intervals
When using intervals, the initializers set_flags are set to SET_F_INTERVAL, however that is not propagated back to the set, so the segtree construction is not performed. Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'src/evaluate.c')
-rw-r--r--src/evaluate.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/evaluate.c b/src/evaluate.c
index a2cc8e45..9e49e911 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -679,6 +679,8 @@ static int expr_evaluate_map(struct eval_ctx *ctx, struct expr **expr)
if (expr_evaluate(ctx, &map->mappings->set->init) < 0)
return -1;
ctx->set = NULL;
+
+ map->mappings->set->flags |= map->mappings->set->init->set_flags;
break;
case EXPR_SYMBOL:
if (expr_evaluate(ctx, &map->mappings) < 0)
@@ -696,7 +698,7 @@ static int expr_evaluate_map(struct eval_ctx *ctx, struct expr **expr)
map->flags |= EXPR_F_CONSTANT;
/* Data for range lookups needs to be in big endian order */
- if (map->mappings->set_flags & SET_F_INTERVAL &&
+ if (map->mappings->set->flags & SET_F_INTERVAL &&
byteorder_conversion(ctx, &map->map, BYTEORDER_BIG_ENDIAN) < 0)
return -1;