Commit 310d40a9 authored by Varun Prakash's avatar Varun Prakash Committed by Nicholas Bellinger

iscsi-target: fix invalid flags in text response

In case of multiple text responses iscsi-target
sets both 'F' and 'C' bit for the final text response
pdu, this issue happens because hdr->flags is not
zeroed out before ORing with 'F' bit.

This patch removes the | operator to fix this issue.
Signed-off-by: default avatarVarun Prakash <varun@chelsio.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent ea8dc5b4
...@@ -3488,9 +3488,9 @@ iscsit_build_text_rsp(struct iscsi_cmd *cmd, struct iscsi_conn *conn, ...@@ -3488,9 +3488,9 @@ iscsit_build_text_rsp(struct iscsi_cmd *cmd, struct iscsi_conn *conn,
return text_length; return text_length;
if (completed) { if (completed) {
hdr->flags |= ISCSI_FLAG_CMD_FINAL; hdr->flags = ISCSI_FLAG_CMD_FINAL;
} else { } else {
hdr->flags |= ISCSI_FLAG_TEXT_CONTINUE; hdr->flags = ISCSI_FLAG_TEXT_CONTINUE;
cmd->read_data_done += text_length; cmd->read_data_done += text_length;
if (cmd->targ_xfer_tag == 0xFFFFFFFF) if (cmd->targ_xfer_tag == 0xFFFFFFFF)
cmd->targ_xfer_tag = session_get_next_ttt(conn->sess); cmd->targ_xfer_tag = session_get_next_ttt(conn->sess);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment