aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_transport_iscsi.c
diff options
context:
space:
mode:
authorMike Christie <michael.christie@oracle.com>2020-07-01 20:43:23 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2020-07-08 00:14:34 -0400
commit639341bf8836f25059f241f1e788e8cd7585ec07 (patch)
treecc379a552fadfbb33f94ea22b8f94423bff21e3e /drivers/scsi/scsi_transport_iscsi.c
parentscsi: target: Fix iscsi transport id buf len calculation (diff)
downloadlinux-dev-639341bf8836f25059f241f1e788e8cd7585ec07.tar.xz
linux-dev-639341bf8836f25059f241f1e788e8cd7585ec07.zip
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