]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
iscsi: Validate DataSN values in Data-In PDUs in the initiator.
authorJohn Baldwin <jhb@FreeBSD.org>
Tue, 24 Aug 2021 21:58:34 +0000 (14:58 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Tue, 24 Aug 2021 21:58:34 +0000 (14:58 -0700)
commit4f0f5bf99591ad9907822082270523ac919e3b8c
tree5665e4d0caecdf94ea0d679b3bc70b56bd787bed
parent71fbc6faed62e8eb5864f7c40839740f5e9f5558
iscsi: Validate DataSN values in Data-In PDUs in the initiator.

As is done in the target, require that DataSN values are consecutive
and in-order.  If an out of order Data-In PDU is received, force a
session reconnect.  In addition, when a SCSI Response PDU is received,
verify that the ExpDataSN field matches the count of Data-In PDUs
received for this command.  If not, force a session reconnect.

Reviewed by: mav
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D31594
sys/dev/iscsi/iscsi.c
sys/dev/iscsi/iscsi.h