svn commit: r279589 - head/usr.sbin/ctld
Alexander Motin
mav at FreeBSD.org
Wed Mar 4 12:12:47 UTC 2015
Author: mav
Date: Wed Mar 4 12:12:46 2015
New Revision: 279589
URL: https://svnweb.freebsd.org/changeset/base/279589
Log:
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.
MFC after: 1 week
Modified:
head/usr.sbin/ctld/discovery.c
Modified: head/usr.sbin/ctld/discovery.c
==============================================================================
--- head/usr.sbin/ctld/discovery.c Wed Mar 4 11:20:01 2015 (r279588)
+++ head/usr.sbin/ctld/discovery.c Wed Mar 4 12:12:46 2015 (r279589)
@@ -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);
}
More information about the svn-src-head
mailing list