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
This commit is contained in:
Ronnie Sahlberg 2003-09-09 09:54:13 +00:00
parent e759fbd9d4
commit 24bf25d652
1 changed files with 10 additions and 3 deletions

View File

@ -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);