summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ctld/discovery.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-03-11 09:51:53 +0000
committermav <mav@FreeBSD.org>2015-03-11 09:51:53 +0000
commitbb2d9174ab9cbc151e93f4bf3c3326954ca56bb2 (patch)
tree235698d3353c3b38309c93632a7c2b705a94fc56 /usr.sbin/ctld/discovery.c
parentfa6dbb5ad5277c7b4c8acbc94d1d0e7b4a4d208a (diff)
downloadFreeBSD-src-bb2d9174ab9cbc151e93f4bf3c3326954ca56bb2.zip
FreeBSD-src-bb2d9174ab9cbc151e93f4bf3c3326954ca56bb2.tar.gz
MFC r279589: Fix handling of queued text and logout requests.
While it may have little sense, text and logout requests can be queued. If they are, they consume cmdsn, so we should increment our conn_cmdsn.
Diffstat (limited to 'usr.sbin/ctld/discovery.c')
-rw-r--r--usr.sbin/ctld/discovery.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/ctld/discovery.c b/usr.sbin/ctld/discovery.c
index 88ca64c..15eaa76 100644
--- a/usr.sbin/ctld/discovery.c
+++ b/usr.sbin/ctld/discovery.c
@@ -75,6 +75,8 @@ text_receive(struct connection *conn)
conn->conn_statsn);
}
conn->conn_cmdsn = ntohl(bhstr->bhstr_cmdsn);
+ if ((bhstr->bhstr_opcode & ISCSI_BHS_OPCODE_IMMEDIATE) == 0)
+ conn->conn_cmdsn++;
return (request);
}
@@ -131,6 +133,8 @@ logout_receive(struct connection *conn)
conn->conn_statsn);
}
conn->conn_cmdsn = ntohl(bhslr->bhslr_cmdsn);
+ if ((bhslr->bhslr_opcode & ISCSI_BHS_OPCODE_IMMEDIATE) == 0)
+ conn->conn_cmdsn++;
return (request);
}
OpenPOWER on IntegriCloud