scsi: target: iscsi: Do not require target authentication
authorDmitry Bogdanov <d.bogdanov@yadro.com>
Mon, 18 Jul 2022 15:25:55 +0000 (18:25 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 27 Jul 2022 02:13:29 +0000 (22:13 -0400)
commit292cef5e6262e7976dca310ed9c86f135b807bb4
tree204ab6cfbe3608dc998b5bdf7423a754f5f753c8
parente52b904b49273df35766826ce8dfb8cc3dd1ff37
scsi: target: iscsi: Do not require target authentication

RFC7143 states that Initiator decides what type of authentication to
use:

The initiator MUST continue with:
    CHAP_N=<N> CHAP_R=<R>
or, if it requires target authentication, with:
    CHAP_N=<N> CHAP_R=<R> CHAP_I=<I> CHAP_C=<C>

Allow one way authentication if mutual authentication is configured.  That
passes some tests from Windows HLK for Mutual CHAP with iSNS.

Link: https://lore.kernel.org/r/20220718152555.17084-5-d.bogdanov@yadro.com
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/iscsi/iscsi_target_auth.c
drivers/target/iscsi/iscsi_target_nego.c