LOGIN commands NEVER use header digest since even if the login is spanning multiple PDU sequences it is still treated as one logical operation.

Dont update the header_digest setting until we have finished login and are transitioning to the full-feature phase.
This commit is contained in:
Ronnie Sahlberg
2012-06-17 12:37:13 +10:00
parent 1d3e910769
commit b23547546f

View File

@@ -1016,13 +1016,9 @@ iscsi_process_login_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu,
if (!strncmp(ptr, "HeaderDigest=", 13)) {
if (!strcmp(ptr + 13, "CRC32C")) {
iscsi->header_digest
= ISCSI_HEADER_DIGEST_CRC32C;
iscsi->want_header_digest
= ISCSI_HEADER_DIGEST_CRC32C;
} else {
iscsi->header_digest
= ISCSI_HEADER_DIGEST_NONE;
iscsi->want_header_digest
= ISCSI_HEADER_DIGEST_NONE;
}
@@ -1103,6 +1099,7 @@ iscsi_process_login_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu,
&& (in->hdr[1] & ISCSI_PDU_LOGIN_NSG_FF) == ISCSI_PDU_LOGIN_NSG_FF) {
iscsi->is_loggedin = 1;
iscsi->itt++;
iscsi->header_digest = iscsi->want_header_digest;
pdu->callback(iscsi, SCSI_STATUS_GOOD, NULL, pdu->private_data);
} else {
if (iscsi_login_async(iscsi, pdu->callback, pdu->private_data) != 0) {