summaryrefslogtreecommitdiffstats
path: root/staslib
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-04 09:21:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-04 09:21:43 +0000
commit96ae15bbde7c45fbd8c46f41b18b31d9880e3e39 (patch)
tree272f25f8b01ecacea778aa76b3b98ebe2eb560cc /staslib
parentReleasing debian version 2.3~rc4-1. (diff)
downloadnvme-stas-96ae15bbde7c45fbd8c46f41b18b31d9880e3e39.tar.xz
nvme-stas-96ae15bbde7c45fbd8c46f41b18b31d9880e3e39.zip
Merging upstream version 2.3~rc5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'staslib')
-rw-r--r--staslib/udev.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/staslib/udev.py b/staslib/udev.py
index 48b7d1f..e054fdc 100644
--- a/staslib/udev.py
+++ b/staslib/udev.py
@@ -251,12 +251,14 @@ class Udev:
6.1.
'''
# 'transport', 'traddr', 'trsvcid', 'subsysnqn', and 'host-nqn' must exactly match.
- if (
- cid['transport'] != tid.transport
- or cid['trsvcid'] != tid.trsvcid
- or cid['subsysnqn'] != tid.subsysnqn
- or cid['host-nqn'] != tid.host_nqn
- ):
+ if tid.transport != cid['transport'] or tid.trsvcid != cid['trsvcid'] or tid.host_nqn != cid['host-nqn']:
+ return False
+
+ # With TP8013, Discovery Controllers may respond with a unique NQN even
+ # when a connection request is made with the well-known NQN. Therefore,
+ # the subsysnqn is not reliable when the candidate requests the well-
+ # known NQN.
+ if tid.subsysnqn not in (defs.WELL_KNOWN_DISC_NQN, cid['subsysnqn']):
return False
if tid.transport in ('tcp', 'rdma'):