]> Git Repo - linux.git/commitdiff
scsi: qedi: Correct max length of CHAP secret
authorNilesh Javali <[email protected]>
Thu, 17 Dec 2020 10:51:44 +0000 (02:51 -0800)
committerMartin K. Petersen <[email protected]>
Wed, 6 Jan 2021 04:22:50 +0000 (23:22 -0500)
The CHAP secret displayed garbage characters causing iSCSI login
authentication failure. Correct the CHAP password max length.

Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Lee Duncan <[email protected]>
Signed-off-by: Nilesh Javali <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
drivers/scsi/qedi/qedi_main.c

index f5fc7f518f8afea5e05504400450422b0905bc42..47ad64b06623696ca510da02ffafa0d0149256ce 100644 (file)
@@ -2245,7 +2245,7 @@ qedi_show_boot_tgt_info(struct qedi_ctx *qedi, int type,
                             chap_name);
                break;
        case ISCSI_BOOT_TGT_CHAP_SECRET:
-               rc = sprintf(buf, "%.*s\n", NVM_ISCSI_CFG_CHAP_NAME_MAX_LEN,
+               rc = sprintf(buf, "%.*s\n", NVM_ISCSI_CFG_CHAP_PWD_MAX_LEN,
                             chap_secret);
                break;
        case ISCSI_BOOT_TGT_REV_CHAP_NAME:
@@ -2253,7 +2253,7 @@ qedi_show_boot_tgt_info(struct qedi_ctx *qedi, int type,
                             mchap_name);
                break;
        case ISCSI_BOOT_TGT_REV_CHAP_SECRET:
-               rc = sprintf(buf, "%.*s\n", NVM_ISCSI_CFG_CHAP_NAME_MAX_LEN,
+               rc = sprintf(buf, "%.*s\n", NVM_ISCSI_CFG_CHAP_PWD_MAX_LEN,
                             mchap_secret);
                break;
        case ISCSI_BOOT_TGT_FLAGS:
This page took 0.058416 seconds and 4 git commands to generate.