aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnish Bhatt <anish@chelsio.com>2014-10-06 22:34:02 -0700
committerMichael Mann <mmann78@netscape.net>2014-10-07 20:53:27 +0000
commit12800157d6b813768cd5adfef4ce3c5c2eec81c5 (patch)
tree8775d099fb217219935b00489e839731527f358c
parent683165272fa992e3642c5e7606578ffc9510c195 (diff)
[iSCSI] Fix incorrect heuristic.
The only valid check for Expected Data Transfer Length is : R and W MUST NOT both be 0 when the Expected Data Transfer Length and/or Bidirectional Read Expected Data Transfer Length are not 0 Bug #10469 Change-Id: I5503a5ad524c4e237b143696fc8eda895bcb9172 Reviewed-on: https://code.wireshark.org/review/4514 Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--epan/dissectors/packet-iscsi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/dissectors/packet-iscsi.c b/epan/dissectors/packet-iscsi.c
index 878e856918..4577170f5b 100644
--- a/epan/dissectors/packet-iscsi.c
+++ b/epan/dissectors/packet-iscsi.c
@@ -2096,9 +2096,11 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean chec
if(tvb_get_ntoh48(tvb, offset+10)){
return 0;
}
- /* expected data transfer length is never >16MByte ? */
- if(tvb_get_guint8(tvb,offset+20)){
- return 0;
+ /* if expected data transfer length is set, W and/or R have to be set */
+ if(tvb_get_ntohl(tvb,offset+20)){
+ if(!(tvb_get_guint8(tvb, offset+1)&0x60)){
+ return 0;
+ }
}
break;
case ISCSI_OPCODE_SCSI_RESPONSE: