diff options
author | mj162486 <none@none> | 2008-04-05 00:37:42 -0700 |
---|---|---|
committer | mj162486 <none@none> | 2008-04-05 00:37:42 -0700 |
commit | ef4e2524f910dee0f2e9d33a6650afade5fb51f7 (patch) | |
tree | 36bae445808e79b1d4dd9de80b4c368997716889 | |
parent | fa5e8906f3e76cdbc7921f3f3e6976469620aae3 (diff) | |
download | illumos-gate-ef4e2524f910dee0f2e9d33a6650afade5fb51f7.tar.gz |
6675535 iSCSI target is not updating StatSN correctly for NOP-In
-rw-r--r-- | usr/src/cmd/iscsi/iscsitgtd/iscsi_conn.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/usr/src/cmd/iscsi/iscsitgtd/iscsi_conn.c b/usr/src/cmd/iscsi/iscsitgtd/iscsi_conn.c index 4e84a91a2e..e0d6259d0f 100644 --- a/usr/src/cmd/iscsi/iscsitgtd/iscsi_conn.c +++ b/usr/src/cmd/iscsi/iscsitgtd/iscsi_conn.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -493,15 +493,12 @@ iscsi_conn_pkt(iscsi_conn_t *c, iscsi_rsp_hdr_t *in) case ISCSI_OP_NOOP_IN: in->statsn = htonl(c->c_statsn); /* - * Only bump the STATSN value if this packet is in response to - * an initiator's ping. Section 10.19.1 of RFC3720 specifies - * that the value must be 0xffffffff when responding to an - * initiator. So, if the value is the reserved ITT value then - * this packet was generated in reponse to an initiator ping. - * Otherwise, we timed out on the connection and are requesting - * a ping. + * RFC 3720 section 10.19. specifies: + * - ITT is different from 0xffffffff in NOP-In when responding + * to incomming NOP-Out; and set to 0xffffffff otherwise + * - StatSN is not advanced for ITT set to 0xffffffff */ - if (((iscsi_nop_in_hdr_t *)in)->ttt == ISCSI_RSVD_TASK_TAG) + if (((iscsi_nop_in_hdr_t *)in)->itt != ISCSI_RSVD_TASK_TAG) c->c_statsn++; break; } |