[SCSI] iscsi: opcode check fix
authorMike Christie <michaelc@cs.wisc.edu>
Wed, 30 Nov 2005 05:12:46 +0000 (23:12 -0600)
committerJames Bottomley <jejb@mulgrave.(none)>
Wed, 14 Dec 2005 01:11:53 +0000 (18:11 -0700)
Must check only valid opcode bits.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/iscsi_tcp.c

index 4fea3e4edaa7148803fcfa8bbe49c83a538bcb51..0769e948219437af74efd14e42af811d64a73495 100644 (file)
@@ -584,7 +584,7 @@ iscsi_hdr_recv(struct iscsi_conn *conn)
        }
 
        /* save opcode for later */
-       conn->in.opcode = hdr->opcode;
+       conn->in.opcode = hdr->opcode & ISCSI_OPCODE_MASK;
 
        /* verify itt (itt encoding: age+cid+itt) */
        if (hdr->itt != cpu_to_be32(ISCSI_RESERVED_TAG)) {