Blame SOURCES/0067-libmultipath-avoid-infinite-loop-with-bad-vpd-page-8.patch

b46d12
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
b46d12
From: Benjamin Marzinski <bmarzins@redhat.com>
b46d12
Date: Thu, 25 Mar 2021 19:52:43 -0500
b46d12
Subject: [PATCH] libmultipath: avoid infinite loop with bad vpd page 83
b46d12
 identifier
b46d12
b46d12
If a device with a scsi name identifier has an unknown prefix,
b46d12
parse_vpd_pg83() needs to advance to the next identifier, instead of
b46d12
simply trying the same one again in an infinite loop.
b46d12
b46d12
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
b46d12
Reviewed-by: Martin Wilck <mwilck@suse.com>
b46d12
---
b46d12
 libmultipath/discovery.c | 2 +-
b46d12
 1 file changed, 1 insertion(+), 1 deletion(-)
b46d12
b46d12
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
b46d12
index bc267609..8c2ab073 100644
b46d12
--- a/libmultipath/discovery.c
b46d12
+++ b/libmultipath/discovery.c
b46d12
@@ -1101,7 +1101,7 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
b46d12
 			if (memcmp(d + 4, "eui.", 4) &&
b46d12
 			    memcmp(d + 4, "naa.", 4) &&
b46d12
 			    memcmp(d + 4, "iqn.", 4))
b46d12
-				continue;
b46d12
+				break;
b46d12
 			if (prio < 4) {
b46d12
 				prio = 4;
b46d12
 				vpd = d;
b46d12
-- 
b46d12
2.17.2
b46d12