summaryrefslogtreecommitdiffstats
path: root/src/intervals.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2023-03-27 16:36:31 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2023-03-28 10:26:34 +0200
commit5e39a34b196d68b803911aa13066fef2f83dc98c (patch)
tree7c36bcbf2d12a3706806a6c60154ace8a8705634 /src/intervals.c
parentfd76cdcb9a62552c7c8b6cdf6f1591f12aa9b482 (diff)
intervals: use expression location when translating to intervals
Otherwise, internal location reports: # nft -f ruleset.nft internal:0:0-0: Error: Could not process rule: File exists after this patch: # nft -f ruleset.nft ruleset.nft:402:1-16: Error: Could not process rule: File exists 1.2.3.0/30, ^^^^^^^^^^^ Fixes: 81e36530fcac ("src: replace interval segment tree overlap and automerge") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/intervals.c')
-rw-r--r--src/intervals.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intervals.c b/src/intervals.c
index 95e25cf0..d79c52c5 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -709,9 +709,9 @@ int set_to_intervals(const struct set *set, struct expr *init, bool add)
if (set->key->byteorder == BYTEORDER_HOST_ENDIAN)
mpz_switch_byteorder(expr->value, set->key->len / BITS_PER_BYTE);
- newelem = set_elem_expr_alloc(&internal_location, expr);
+ newelem = set_elem_expr_alloc(&expr->location, expr);
if (i->etype == EXPR_MAPPING) {
- newelem = mapping_expr_alloc(&internal_location,
+ newelem = mapping_expr_alloc(&expr->location,
newelem,
expr_get(i->right));
}