login: implicitly set statsn
RFC3720 10.13.4. states that the statsn should explicitly set with the first Login Repsonse. In theory the target could choose a StatSN that is not greater than iscsi->statsn (zero at start) in Serial32 arithmetic. Signed-off-by: Peter Lieven <pl@kamp.de>
This commit is contained in:
@@ -1045,7 +1045,13 @@ iscsi_process_login_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu,
|
||||
|
||||
status = scsi_get_uint16(&in->hdr[36]);
|
||||
|
||||
iscsi_adjust_statsn(iscsi, in);
|
||||
// Status-Class is 0
|
||||
if (!(status >> 8)) {
|
||||
if (!iscsi->current_phase && !iscsi->secneg_phase) {
|
||||
iscsi->statsn = scsi_get_uint32(&in->hdr[24]);
|
||||
}
|
||||
iscsi_adjust_statsn(iscsi, in);
|
||||
}
|
||||
iscsi_adjust_maxexpcmdsn(iscsi, in);
|
||||
|
||||
/* Using bidirectional CHAP? Then we must see a chap_n and chap_r
|
||||
|
||||
Reference in New Issue
Block a user