Commit 68349756 authored by Nicholas Bellinger's avatar Nicholas Bellinger

iscsi-target: Explicily clear login response PDU in exception path

This patch adds a explicit memset to the login response PDU
exception path in iscsit_tx_login_rsp().

This addresses a regression bug introduced in commit baa4d64b
where the initiator would end up not receiving the login
response and associated status class + detail, before closing
the login connection.
Reported-by: default avatarChristophe Vu-Brugier <cvubrugier@yahoo.fr>
Tested-by: default avatarChristophe Vu-Brugier <cvubrugier@yahoo.fr>
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 83ff42fc
...@@ -1295,6 +1295,8 @@ int iscsit_tx_login_rsp(struct iscsi_conn *conn, u8 status_class, u8 status_deta ...@@ -1295,6 +1295,8 @@ int iscsit_tx_login_rsp(struct iscsi_conn *conn, u8 status_class, u8 status_deta
login->login_failed = 1; login->login_failed = 1;
iscsit_collect_login_stats(conn, status_class, status_detail); iscsit_collect_login_stats(conn, status_class, status_detail);
memset(&login->rsp[0], 0, ISCSI_HDR_LEN);
hdr = (struct iscsi_login_rsp *)&login->rsp[0]; hdr = (struct iscsi_login_rsp *)&login->rsp[0];
hdr->opcode = ISCSI_OP_LOGIN_RSP; hdr->opcode = ISCSI_OP_LOGIN_RSP;
hdr->status_class = status_class; hdr->status_class = status_class;
......
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