Skip to content

Commit d50c798

Browse files
njavalimartinkpetersen
authored andcommitted
scsi: qedi: Correct max length of CHAP secret
The CHAP secret displayed garbage characters causing iSCSI login authentication failure. Correct the CHAP password max length. Link: https://lore.kernel.org/r/20201217105144.8055-1-njavali@marvell.com Reviewed-by: Lee Duncan <lduncan@suse.com> Signed-off-by: Nilesh Javali <njavali@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 35fc4cd commit d50c798

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/scsi/qedi/qedi_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2245,15 +2245,15 @@ qedi_show_boot_tgt_info(struct qedi_ctx *qedi, int type,
22452245
chap_name);
22462246
break;
22472247
case ISCSI_BOOT_TGT_CHAP_SECRET:
2248-
rc = sprintf(buf, "%.*s\n", NVM_ISCSI_CFG_CHAP_NAME_MAX_LEN,
2248+
rc = sprintf(buf, "%.*s\n", NVM_ISCSI_CFG_CHAP_PWD_MAX_LEN,
22492249
chap_secret);
22502250
break;
22512251
case ISCSI_BOOT_TGT_REV_CHAP_NAME:
22522252
rc = sprintf(buf, "%.*s\n", NVM_ISCSI_CFG_CHAP_NAME_MAX_LEN,
22532253
mchap_name);
22542254
break;
22552255
case ISCSI_BOOT_TGT_REV_CHAP_SECRET:
2256-
rc = sprintf(buf, "%.*s\n", NVM_ISCSI_CFG_CHAP_NAME_MAX_LEN,
2256+
rc = sprintf(buf, "%.*s\n", NVM_ISCSI_CFG_CHAP_PWD_MAX_LEN,
22572257
mchap_secret);
22582258
break;
22592259
case ISCSI_BOOT_TGT_FLAGS:

0 commit comments

Comments
 (0)