Blame SOURCES/0025-segtree-Fix-missing-expires-value-in-prefixes.patch

3e48d9
From ab62f33df5ef33f6eff8d88d9475a01822a2f625 Mon Sep 17 00:00:00 2001
3e48d9
From: Phil Sutter <psutter@redhat.com>
3e48d9
Date: Tue, 30 Jun 2020 16:20:22 +0200
3e48d9
Subject: [PATCH] segtree: Fix missing expires value in prefixes
3e48d9
3e48d9
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1832235
3e48d9
Upstream Status: nftables commit 60ba9c22fecc0
3e48d9
3e48d9
commit 60ba9c22fecc0ca9bb2a61f6ad39bceed1aee38f
3e48d9
Author: Phil Sutter <phil@nwl.cc>
3e48d9
Date:   Tue Apr 28 20:54:03 2020 +0200
3e48d9
3e48d9
    segtree: Fix missing expires value in prefixes
3e48d9
3e48d9
    This probable copy'n'paste bug prevented 'expiration' field from being
3e48d9
    populated when turning a range into a prefix in
3e48d9
    interval_map_decompose(). Consequently, interval sets with timeout did
3e48d9
    print expiry value for ranges (such as 10.0.0.1-10.0.0.5) but not
3e48d9
    prefixes (10.0.0.0/8, for instance).
3e48d9
3e48d9
    Fixes: bb0e6d8a2851b ("segtree: incorrect handling of comments and timeouts with mapping")
3e48d9
    Signed-off-by: Phil Sutter <phil@nwl.cc>
3e48d9
---
3e48d9
 src/segtree.c | 2 +-
3e48d9
 1 file changed, 1 insertion(+), 1 deletion(-)
3e48d9
3e48d9
diff --git a/src/segtree.c b/src/segtree.c
3e48d9
index e859f84..1ba4363 100644
3e48d9
--- a/src/segtree.c
3e48d9
+++ b/src/segtree.c
3e48d9
@@ -1086,7 +1086,7 @@ void interval_map_decompose(struct expr *set)
3e48d9
 					prefix->comment = xstrdup(low->comment);
3e48d9
 				if (low->timeout)
3e48d9
 					prefix->timeout = low->timeout;
3e48d9
-				if (low->left->expiration)
3e48d9
+				if (low->expiration)
3e48d9
 					prefix->expiration = low->expiration;
3e48d9
 			}
3e48d9
 
3e48d9
-- 
252916
2.31.1
3e48d9