]> git.baikalelectronics.ru Git - kernel.git/commit
iscsi-target: Fix CHAP_A parameter list handling
authorTejas Vaykole <tejas.vaykole@calsoftinc.com>
Fri, 30 May 2014 05:43:47 +0000 (11:13 +0530)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 6 Jun 2014 02:44:02 +0000 (19:44 -0700)
commite78a7ac4f19f4d8aa9ecd0fa7bacf1f1e264354e
treefcba72fafb5e7e4e6908cb6238962585a60189a0
parentfc9a87c3f111232874aeae41a2169109981d85d1
iscsi-target: Fix CHAP_A parameter list handling

The target is failing to handle list of CHAP_A key-value pair form
initiator.The target is expecting CHAP_A=5 always. In other cases,
where initiator sends list (for example) CHAP_A=6,5 target is failing
the security negotiation. Which is incorrect.

This patch handles the case (RFC 3720 section 11.1.4).
where in the initiator may send list of CHAP_A values and target replies
with appropriate CHAP_A value in response

(Drop whitespaces + rename to chap_check_algorithm + save original
 pointer + add explicit check for CHAP_A key - nab)

Signed-off-by: Tejas Vaykole <tejas.vaykole@calsoftinc.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target_auth.c
drivers/target/iscsi/iscsi_target_auth.h