PDU use serial32 arithmetic for cmdsn, maxcmdsn and expcmdsn.

RFC3720 says that cmdsn comparison must be done using
serial32 arithmetic. This will definetly avoid a deadlock
if cmdsn wraps from 2^32-1 to 0.

Signed-off-by: Peter Lieven <pl@kamp.de>
This commit is contained in:
Peter Lieven
2012-11-28 10:37:28 +01:00
parent 700d363a88
commit cd09c0f17d
6 changed files with 30 additions and 9 deletions

View File

@@ -325,6 +325,9 @@ iscsi_log_message(struct iscsi_context *iscsi, int level, const char *format, ..
void
iscsi_add_to_outqueue(struct iscsi_context *iscsi, struct iscsi_pdu *pdu);
int
iscsi_serial32_compare(u_int32_t s1, u_int32_t s2);
#ifdef __cplusplus
}
#endif