aboutsummaryrefslogtreecommitdiff
path: root/sys/cam
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2021-01-24 18:58:29 +0000
committerAlexander Motin <mav@FreeBSD.org>2021-01-24 18:58:29 +0000
commitb31dae0caa0286820805951842fa871f71b33d75 (patch)
tree609ebf66c6292d5a123c10b642ded540e13b777f /sys/cam
parent7680431a38cc2624f7415012fb9d21d7bdb3f8c9 (diff)
downloadsrc-b31dae0caa0286820805951842fa871f71b33d75.tar.gz
src-b31dae0caa0286820805951842fa871f71b33d75.zip
Exclude reserved iSCSI Target Transfer Tag.
RFC 7143 (11.7.4): The Target Transfer Tag values are not specified by this protocol, except that the value 0xffffffff is reserved and means that the Target Transfer Tag is not supplied. MFC after: 1 month
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/ctl/ctl_frontend_iscsi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/cam/ctl/ctl_frontend_iscsi.c b/sys/cam/ctl/ctl_frontend_iscsi.c
index 996ab4e44fc0..8b0effcaf393 100644
--- a/sys/cam/ctl/ctl_frontend_iscsi.c
+++ b/sys/cam/ctl/ctl_frontend_iscsi.c
@@ -2693,6 +2693,10 @@ cfiscsi_datamove_out(union ctl_io *io)
target_transfer_tag =
atomic_fetchadd_32(&cs->cs_target_transfer_tag, 1);
+ if (target_transfer_tag == 0xffffffff) {
+ target_transfer_tag =
+ atomic_fetchadd_32(&cs->cs_target_transfer_tag, 1);
+ }
cdw = cfiscsi_data_wait_new(cs, io, bhssc->bhssc_initiator_task_tag,
&target_transfer_tag);
if (cdw == NULL) {