nftables/SOURCES/0011-segtree-incorrect-handling-of-last-element-in-get_se.patch
2021-09-09 22:49:01 +00:00

33 lines
1.0 KiB
Diff

From 0a80f39e125ba9bb41386607e0db04b271c0bcea Mon Sep 17 00:00:00 2001
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Wed, 10 Oct 2018 15:41:04 +0200
Subject: [PATCH] segtree: incorrect handling of last element in
get_set_decompose()
Add range to the list of matching elements.
Fixes: 95629758a5ec ("segtree: bogus range via get set element on existing elements")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit 98b047f231215817d87a49dfffbe7b4c0dc29b57)
Signed-off-by: Phil Sutter <psutter@redhat.com>
---
src/segtree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/segtree.c b/src/segtree.c
index dc457d6bc1b7d..4ee09884cbde6 100644
--- a/src/segtree.c
+++ b/src/segtree.c
@@ -753,7 +753,7 @@ int get_set_decompose(struct table *table, struct set *set)
if (left) {
range = get_set_interval_end(table, set->handle.set.name, left);
if (range)
- compound_expr_add(new_init, left);
+ compound_expr_add(new_init, range);
else
compound_expr_add(new_init, expr_clone(left));
}
--
2.21.0