device-mapper-multipath/SOURCES/0068-libmultipath-fix-priorities-in-parse_vpd_pg83.patch
2021-09-09 15:58:56 +00:00

51 lines
1.4 KiB
Diff

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