Blame SOURCES/0005-extensions-cluster-Avoid-undefined-shift.patch

6ef253
From 45aacdc1bbb3a889d9820c1fb587dc8df3cae763 Mon Sep 17 00:00:00 2001
6ef253
From: Phil Sutter <phil@nwl.cc>
6ef253
Date: Thu, 5 Dec 2019 13:36:31 +0100
6ef253
Subject: [PATCH] extensions: cluster: Avoid undefined shift
6ef253
6ef253
Value 1 is signed by default and left-shifting by 31 is undefined for
6ef253
those. Fix this by marking the value as unsigned.
6ef253
6ef253
Fixes: 64a0e09894e52 ("extensions: libxt_cluster: Add translation to nft")
6ef253
(cherry picked from commit 28c16371cdad16707674450b59919e3d97185694)
6ef253
Signed-off-by: Phil Sutter <psutter@redhat.com>
6ef253
---
6ef253
 extensions/libxt_cluster.c | 2 +-
6ef253
 1 file changed, 1 insertion(+), 1 deletion(-)
6ef253
6ef253
diff --git a/extensions/libxt_cluster.c b/extensions/libxt_cluster.c
6ef253
index c9c35ee22e3df..d164bf6960166 100644
6ef253
--- a/extensions/libxt_cluster.c
6ef253
+++ b/extensions/libxt_cluster.c
6ef253
@@ -156,7 +156,7 @@ static int cluster_xlate(struct xt_xlate *xl,
6ef253
 		xt_xlate_add(xl, "%s %u seed 0x%08x ", jhash_st,
6ef253
 				info->total_nodes, info->hash_seed);
6ef253
 		for (node = 0; node < 32; node++) {
6ef253
-			if (info->node_mask & (1 << node)) {
6ef253
+			if (info->node_mask & (1u << node)) {
6ef253
 				if (needs_set == 0) {
6ef253
 					xt_xlate_add(xl, "{ ");
6ef253
 					needs_set = 1;
6ef253
-- 
6ef253
2.24.0
6ef253