]> 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, 23 Nov 2021 23:11:44 +0000 (15:11 -0800)
commit9811763b417a36ca66c8512bbe09fcaec4407514
tree6d64715fe064967e309aea04374291e663a971f7
parentb3d02f0be3ecd4a08fcd4b9ca366f9cf56418356
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

(cherry picked from commit 4f0f5bf99591ad9907822082270523ac919e3b8c)
sys/dev/iscsi/iscsi.c
sys/dev/iscsi/iscsi.h