From 1affe46773ea8ac6deacc8b1b126c7ad4708356f Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Sun, 9 Dec 2012 13:35:23 +0100 Subject: 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 --- src/evaluate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3