[PATCH] iscsi: set TTT to 0xffffffff in final text response

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

 



I stole this fix from IET.

=
From: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
Subject: [PATCH] iscsi: set TTT to 0xffffffff in final text response

RFC 3720 (10.11.1) says:

A Text Response with the F bit set to 1 MUST have a Target Transfer
Tag field set to the reserved value of 0xffffffff.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
---
 usr/iscsi/iscsid.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/usr/iscsi/iscsid.c b/usr/iscsi/iscsid.c
index 5515fb9..2adc6a8 100644
--- a/usr/iscsi/iscsid.c
+++ b/usr/iscsi/iscsid.c
@@ -872,8 +872,10 @@ static void cmnd_exec_text(struct iscsi_connection *conn)
 		return;
 	}
 
-	if (conn->text_datasize <= max_len)
+	if (conn->text_datasize <= max_len) {
 		rsp->flags = ISCSI_FLAG_CMD_FINAL;
+		conn->ttt = ISCSI_RESERVED_TAG;
+	}
 
 	conn->rsp.datasize = min(max_len, conn->text_datasize);
 	conn->rsp.data = conn->text_rsp_buffer;
-- 
1.5.6.5

--
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