socket: check if expcmdsn is not greater than pdus cmdsn
this is just another sanity check. Signed-off-by: Peter Lieven <pl@kamp.de>
This commit is contained in:
@@ -640,6 +640,11 @@ iscsi_write_to_socket(struct iscsi_context *iscsi)
|
||||
return 0;
|
||||
}
|
||||
/* pop first element of the outqueue */
|
||||
if (iscsi_serial32_compare(iscsi->outqueue->cmdsn, iscsi->expcmdsn) < 0) {
|
||||
iscsi_set_error(iscsi, "iscsi_write_to_scoket: outqueue[0]->cmdsn < expcmdsn (%08x < %08x)",
|
||||
iscsi->outqueue->cmdsn, iscsi->expcmdsn);
|
||||
return -1;
|
||||
}
|
||||
iscsi->outqueue_current = iscsi->outqueue;
|
||||
ISCSI_LIST_REMOVE(&iscsi->outqueue, iscsi->outqueue_current);
|
||||
if (!(iscsi->outqueue_current->flags & ISCSI_PDU_DELETE_WHEN_SENT)) {
|
||||
|
||||
Reference in New Issue
Block a user