diff options
author | Mike Christie <michael.christie@oracle.com> | 2020-07-01 20:43:23 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-07-08 00:14:34 -0400 |
commit | 639341bf8836f25059f241f1e788e8cd7585ec07 (patch) | |
tree | cc379a552fadfbb33f94ea22b8f94423bff21e3e /drivers/scsi/scsi_transport_iscsi.c | |
parent | bd7f65d952007adceceecece39705bb3a1b55f90 (diff) |
scsi: target: Handle short iSIDs
SPC4 has:
The first ISCSI INITIATOR SESSION ID field byte containing an ASCII null
character terminates the ISCSI INITIATOR SESSION ID field without regard
for the specified length of the iSCSI TransportID or the contents of the
ADDITIONAL LENGTH field.
----------------------------------------
which sounds like we can get an iSID shorter than 12 chars. SPC and the
iSCSI RFC do not say how to handle that case other than just cutting off
the iSID. This patch just makes sure that if we get an iSID like that, we
only copy/send that string.
There is no OS that does this right now, so there was no test case. I did
test with sg utils to check it works as expected and nothing breaks.
Link: https://lore.kernel.org/r/1593654203-12442-8-git-send-email-michael.christie@oracle.com
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_transport_iscsi.c')
0 files changed, 0 insertions, 0 deletions