From: Pablo Neira Ayuso Date: Mon, 16 Jun 2025 20:48:02 +0000 (+0200) Subject: expression: constant range is not a singleton X-Git-Tag: v1.1.4~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=674cd951ee642650586a719fda9f5e8c5fcab999;p=thirdparty%2Fnftables.git expression: constant range is not a singleton Remove the EXPR_F_SINGLETON flag in EXPR_RANGE_VALUE so it can be used in maps. expr_evaluate_set() does not toggle NFT_SET_INTERVAL for anonymous sets because a singleton is assumed to be place, leading to this BUG: BUG: invalid data expression type range_value nft: src/netlink.c:577: netlink_gen_key: Assertion `0' failed. Signed-off-by: Pablo Neira Ayuso --- diff --git a/src/expression.c b/src/expression.c index dc9a4467..aa97413d 100644 --- a/src/expression.c +++ b/src/expression.c @@ -612,7 +612,7 @@ struct expr *constant_range_expr_alloc(const struct location *loc, struct expr *expr; expr = expr_alloc(loc, EXPR_RANGE_VALUE, dtype, byteorder, len); - expr->flags = EXPR_F_CONSTANT | EXPR_F_SINGLETON; + expr->flags = EXPR_F_CONSTANT; mpz_init_set(expr->range.low, low); mpz_init_set(expr->range.high, high);