[PATCH] iser: Fix bidirectional chap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When bidirectional chap is used, after the authentication phase is completed, the next
message from the target to the initiator should contain only the session parameters.
Currently it is wrongly prefixed with part of the previous message (which contained
authentication data). Fix that by initializing tx_pdu->membuf.size to zero before any
message is created in iser_login_exec.

Signed-off-by: Shlomo Pongratz <shlomop@xxxxxxxxxxxx>
---
 usr/iscsi/iser_text.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/usr/iscsi/iser_text.c b/usr/iscsi/iser_text.c
index b931f34..c76501a 100644
--- a/usr/iscsi/iser_text.c
+++ b/usr/iscsi/iser_text.c
@@ -610,6 +610,8 @@ void iser_login_exec(struct iscsi_connection *iscsi_conn,
 	struct iscsi_login_rsp *rsp_bhs = (struct iscsi_login_rsp *)tx_pdu->bhs;
 	int stay = 0, nsg_disagree = 0;
 
+	tx_pdu->membuf.size = 0;
+
 	memset(rsp_bhs, 0, BHS_SIZE);
 	if ((req_bhs->opcode & ISCSI_OPCODE_MASK) != ISCSI_OP_LOGIN ||
 	    !(req_bhs->opcode & ISCSI_OP_IMMEDIATE)) {
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux