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