diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2003-09-09 09:54:13 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2003-09-09 09:54:13 +0000 |
commit | 24bf25d65277e0196079be4464ef435bedce9ebf (patch) | |
tree | 3ebd634c45784bbdd2afddec2d322eb3cab8b917 /packet-iscsi.c | |
parent | e759fbd9d45b75bd8510dc403f8ab703f6121e85 (diff) | |
download | wireshark-24bf25d65277e0196079be4464ef435bedce9ebf.tar.gz wireshark-24bf25d65277e0196079be4464ef435bedce9ebf.tar.bz2 wireshark-24bf25d65277e0196079be4464ef435bedce9ebf.zip |
For iSCSI
During the Login phase, if the T bit is not set, then the iniator/targets are not ready to transition to the next stage.
Thus the NSG bits are undefined.
Change the dissector to only dissect the NSG bits iff the T bit is set in the Login pdu.
svn path=/trunk/; revision=8433
Diffstat (limited to 'packet-iscsi.c')
-rw-r--r-- | packet-iscsi.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/packet-iscsi.c b/packet-iscsi.c index 6ece78615e..a4531f7465 100644 --- a/packet-iscsi.c +++ b/packet-iscsi.c @@ -2,7 +2,7 @@ * Routines for iSCSI dissection * Copyright 2001, Eurologic and Mark Burton <markb@ordern.com> * - * $Id: packet-iscsi.c,v 1.46 2003/06/21 10:16:18 sahlberg Exp $ + * $Id: packet-iscsi.c,v 1.47 2003/09/09 09:54:13 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1225,7 +1225,11 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off proto_tree_add_boolean(ti, hf_iscsi_Login_X, tvb, offset + 1, 1, b); } proto_tree_add_item(ti, hf_iscsi_Login_CSG, tvb, offset + 1, 1, FALSE); - proto_tree_add_item(ti, hf_iscsi_Login_NSG, tvb, offset + 1, 1, FALSE); + + /* NSG is undefined unless T is set */ + if(b&0x80){ + proto_tree_add_item(ti, hf_iscsi_Login_NSG, tvb, offset + 1, 1, FALSE); + } } proto_tree_add_item(ti, hf_iscsi_VersionMax, tvb, offset + 2, 1, FALSE); proto_tree_add_item(ti, hf_iscsi_VersionMin, tvb, offset + 3, 1, FALSE); @@ -1289,7 +1293,10 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off proto_tree_add_boolean(ti, hf_iscsi_Login_C, tvb, offset + 1, 1, b); } proto_tree_add_item(ti, hf_iscsi_Login_CSG, tvb, offset + 1, 1, FALSE); - proto_tree_add_item(ti, hf_iscsi_Login_NSG, tvb, offset + 1, 1, FALSE); + /* NSG is undefined unless T is set */ + if(b&0x80){ + proto_tree_add_item(ti, hf_iscsi_Login_NSG, tvb, offset + 1, 1, FALSE); + } } proto_tree_add_item(ti, hf_iscsi_VersionMax, tvb, offset + 2, 1, FALSE); |