Blame SOURCES/0068-libmultipath-fix-priorities-in-parse_vpd_pg83.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:44 -0500
b46d12
Subject: [PATCH] libmultipath: fix priorities in parse_vpd_pg83
b46d12
b46d12
The priorities for the EUI-64 (0x02) and NAME (0x08) scsi identifiers in
b46d12
parse_vpd_pg83() don't match their priorities in 55-scsi-sg3_id.rules.
b46d12
Switch them so that they match.
b46d12
b46d12
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
b46d12
Reviewed-by: Martin Wilck <mwilck@suse.com>
b46d12
---
b46d12
 libmultipath/discovery.c | 16 ++++++++--------
b46d12
 1 file changed, 8 insertions(+), 8 deletions(-)
b46d12
b46d12
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
b46d12
index 8c2ab073..5e988631 100644
b46d12
--- a/libmultipath/discovery.c
b46d12
+++ b/libmultipath/discovery.c
b46d12
@@ -1096,19 +1096,19 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
b46d12
 				vpd = d;
b46d12
 			}
b46d12
 			break;
b46d12
-		case 0x8:
b46d12
-			/* SCSI Name: Prio 4 */
b46d12
-			if (memcmp(d + 4, "eui.", 4) &&
b46d12
-			    memcmp(d + 4, "naa.", 4) &&
b46d12
-			    memcmp(d + 4, "iqn.", 4))
b46d12
-				break;
b46d12
+		case 0x2:
b46d12
+			/* EUI-64: Prio 4 */
b46d12
 			if (prio < 4) {
b46d12
 				prio = 4;
b46d12
 				vpd = d;
b46d12
 			}
b46d12
 			break;
b46d12
-		case 0x2:
b46d12
-			/* EUI-64: Prio 3 */
b46d12
+		case 0x8:
b46d12
+			/* SCSI Name: Prio 3 */
b46d12
+			if (memcmp(d + 4, "eui.", 4) &&
b46d12
+			    memcmp(d + 4, "naa.", 4) &&
b46d12
+			    memcmp(d + 4, "iqn.", 4))
b46d12
+				break;
b46d12
 			if (prio < 3) {
b46d12
 				prio = 3;
b46d12
 				vpd = d;
b46d12
-- 
b46d12
2.17.2
b46d12