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