Explorar el Código

[iscsi] Verify the correct tag in NOP-In PDUs

We should be checking the target transfer tag, rather than the
initiator task tag.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown hace 14 años
padre
commit
9625132bf5
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4
    4
      src/net/tcp/iscsi.c

+ 4
- 4
src/net/tcp/iscsi.c Ver fichero

@@ -617,7 +617,7 @@ static int iscsi_rx_nop_in ( struct iscsi_session *iscsi,
617 617
 	 * (not the reserved 0xffffffff), the initiator MUST respond
618 618
 	 * with a NOP-Out".  Since we never send unsolicited NOP-Outs,
619 619
 	 * my reading of this is that we can handle all permitted
620
-	 * NOP-Ins (which must have ITT set to 0xffffffff) by simply
620
+	 * NOP-Ins (which must have TTT set to 0xffffffff) by simply
621 621
 	 * ignoring them.
622 622
 	 *
623 623
 	 * There is some ambiguity in the RFC, since there are other
@@ -628,9 +628,9 @@ static int iscsi_rx_nop_in ( struct iscsi_session *iscsi,
628 628
 	 * rather than just having the target drop the connection when
629 629
 	 * it times out waiting for the NOP-Out response.
630 630
 	 */
631
-	if ( nop_in->itt != htonl ( ISCSI_TAG_RESERVED ) ) {
632
-		DBGC ( iscsi, "iSCSI %p received invalid NOP-In with ITT "
633
-		       "%08x\n", iscsi, ntohl ( nop_in->itt ) );
631
+	if ( nop_in->ttt != htonl ( ISCSI_TAG_RESERVED ) ) {
632
+		DBGC ( iscsi, "iSCSI %p received invalid NOP-In with TTT "
633
+		       "%08x\n", iscsi, ntohl ( nop_in->ttt ) );
634 634
 		return -EPROTO_INVALID_NOP_IN;
635 635
 	}
636 636
 

Loading…
Cancelar
Guardar