diff options
-rw-r--r-- | epan/dissectors/packet-isns.c | 176 |
1 files changed, 95 insertions, 81 deletions
diff --git a/epan/dissectors/packet-isns.c b/epan/dissectors/packet-isns.c index 46ec72a9d7..8308c4faca 100644 --- a/epan/dissectors/packet-isns.c +++ b/epan/dissectors/packet-isns.c @@ -1118,155 +1118,169 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset, return (offset+8); } - tvb_ensure_bytes_exist(tvb, offset, len); + tvb_ensure_bytes_exist(tvb, offset, len+8); switch( tag ) { case ISNS_ATTR_TAG_DELIMITER: - offset = dissect_isns_attr_none(tvb, offset, tree, hf_isns_delimiter, tag, len); + dissect_isns_attr_none(tvb, offset, tree, hf_isns_delimiter, tag, len); break; case ISNS_ATTR_TAG_ENTITY_IDENTIFIER: - offset = dissect_isns_attr_string(tvb, offset, tree, hf_isns_entity_identifier, tag, len); + dissect_isns_attr_string(tvb, offset, tree, hf_isns_entity_identifier, tag, len); break; case ISNS_ATTR_TAG_ENTITY_PROTOCOL: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_entity_protocol, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_entity_protocol, tag, len, function_id); break; case ISNS_ATTR_TAG_MGMT_IP_ADDRESS: if(len != 16) THROW(ReportedBoundsError); - offset = dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_mgmt_ip_addr, tag, len); + dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_mgmt_ip_addr, tag, len); break; case ISNS_ATTR_TAG_TIMESTAMP: if(len != 8) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_timestamp, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_timestamp, tag, len, function_id); break; case ISNS_ATTR_TAG_PROTOCOL_VERSION_RANGE: - offset = dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); + dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); break; case ISNS_ATTR_TAG_REGISTRATION_PERIOD: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_registration_period, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_registration_period, tag, len, function_id); break; case ISNS_ATTR_TAG_ENTITY_INDEX: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_entity_index, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_entity_index, tag, len, function_id); break; case ISNS_ATTR_TAG_ENTITY_NEXT_INDEX: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_entity_next_index, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_entity_next_index, tag, len, function_id); break; case ISNS_ATTR_TAG_ENTITY_ISAKMP_PHASE_1: - offset = dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); + dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); break; case ISNS_ATTR_TAG_ENTITY_CERTIFICATE: - offset = dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); + dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); break; case ISNS_ATTR_TAG_PORTAL_IP_ADDRESS: - if(len != 16) THROW(ReportedBoundsError); - offset = dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_portal_ip_addr, tag, len); + switch(len){ + case 64: + proto_tree_add_text(tree, tvb, offset, -1, "Broken iSNS implementation. The PORTAL_IP_ADDRESS tag should be 16 bytes in length"); + case 16: + dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_portal_ip_addr, tag, 16); + break; + default: + THROW(ReportedBoundsError); + } break; case ISNS_ATTR_TAG_PORTAL_PORT: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_port(tvb, offset, tree, hf_isns_portal_port, tag, len, ISNS_OTHER_PORT, pinfo); + dissect_isns_attr_port(tvb, offset, tree, hf_isns_portal_port, tag, len, ISNS_OTHER_PORT, pinfo); break; case ISNS_ATTR_TAG_PORTAL_SYMBOLIC_NAME: - offset = dissect_isns_attr_string(tvb, offset, tree, hf_isns_portal_symbolic_name, tag, len); + dissect_isns_attr_string(tvb, offset, tree, hf_isns_portal_symbolic_name, tag, len); break; case ISNS_ATTR_TAG_ESI_INTERVAL: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_esi_interval, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_esi_interval, tag, len, function_id); break; case ISNS_ATTR_TAG_ESI_PORT: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_port(tvb, offset, tree, hf_isns_esi_port, tag, len, ISNS_ESI_PORT, pinfo); + dissect_isns_attr_port(tvb, offset, tree, hf_isns_esi_port, tag, len, ISNS_ESI_PORT, pinfo); break; case ISNS_ATTR_TAG_PORTAL_INDEX: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_portal_index, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_portal_index, tag, len, function_id); break; case ISNS_ATTR_TAG_SCN_PORT: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_port(tvb, offset, tree, hf_isns_scn_port, tag, len, ISNS_SCN_PORT, pinfo); + dissect_isns_attr_port(tvb, offset, tree, hf_isns_scn_port, tag, len, ISNS_SCN_PORT, pinfo); break; case ISNS_ATTR_TAG_PORTAL_NEXT_INDEX: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_portal_next_index, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_portal_next_index, tag, len, function_id); break; case ISNS_ATTR_TAG_PORTAL_SECURITY_BITMAP: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_portal_security_bitmap(tvb, offset, tree, hf_isns_psb, tag, len); + dissect_isns_attr_portal_security_bitmap(tvb, offset, tree, hf_isns_psb, tag, len); break; case ISNS_ATTR_TAG_PORTAL_ISAKMP_PHASE_1: - offset = dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); + dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); break; case ISNS_ATTR_TAG_PORTAL_ISAKMP_PHASE_2: - offset = dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); + dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); break; case ISNS_ATTR_TAG_PORTAL_CERTIFICATE: - offset = dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); + dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); break; case ISNS_ATTR_TAG_ISCSI_NAME: - offset = dissect_isns_attr_string(tvb, offset, tree, hf_isns_iscsi_name, tag, len); + dissect_isns_attr_string(tvb, offset, tree, hf_isns_iscsi_name, tag, len); break; case ISNS_ATTR_TAG_ISCSI_NODE_TYPE: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_iscsi_node_type(tvb, offset, tree, hf_isns_iscsi_node_type, tag, len); + dissect_isns_attr_iscsi_node_type(tvb, offset, tree, hf_isns_iscsi_node_type, tag, len); break; case ISNS_ATTR_TAG_ISCSI_ALIAS: - offset = dissect_isns_attr_string(tvb, offset, tree, hf_isns_iscsi_alias, tag, len); + dissect_isns_attr_string(tvb, offset, tree, hf_isns_iscsi_alias, tag, len); break; case ISNS_ATTR_TAG_ISCSI_SCN_BITMAP: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_scn_bitmap(tvb, offset, tree, hf_isns_scn_bitmap, tag, len); + dissect_isns_attr_scn_bitmap(tvb, offset, tree, hf_isns_scn_bitmap, tag, len); break; case ISNS_ATTR_TAG_ISCSI_NODE_INDEX: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_node_index, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_node_index, tag, len, function_id); break; case ISNS_ATTR_TAG_WWNN_TOKEN: if(len != 8) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_wwnn_token, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_wwnn_token, tag, len, function_id); break; case ISNS_ATTR_TAG_ISCSI_NODE_NEXT_INDEX: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_node_next_index, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_node_next_index, tag, len, function_id); break; case ISNS_ATTR_TAG_ISCSI_AUTH_METHOD: - offset = dissect_isns_attr_string(tvb, offset, tree, hf_isns_iscsi_auth_method, tag, len); + dissect_isns_attr_string(tvb, offset, tree, hf_isns_iscsi_auth_method, tag, len); break; case ISNS_ATTR_TAG_PG_ISCSI_NAME: - offset = dissect_isns_attr_string(tvb, offset, tree, hf_isns_pg_iscsi_name, tag, len); + dissect_isns_attr_string(tvb, offset, tree, hf_isns_pg_iscsi_name, tag, len); break; case ISNS_ATTR_TAG_PG_PORTAL_IP_ADDR: - if(len != 16) THROW(ReportedBoundsError); - offset = dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_pg_portal_ip_addr, tag, len); + switch(len){ + case 64: + proto_tree_add_text(tree, tvb, offset, -1, "Broken iSNS implementation. The PG_PORTAL_IP_ADDRESS tag should be 16 bytes in length"); + case 16: + dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_pg_portal_ip_addr, tag, 16); + break; + default: + THROW(ReportedBoundsError); + } break; case ISNS_ATTR_TAG_PG_PORTAL_PORT: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_port(tvb, offset, tree, hf_isns_pg_portal_port, tag, len, ISNS_OTHER_PORT, pinfo); + dissect_isns_attr_port(tvb, offset, tree, hf_isns_pg_portal_port, tag, len, ISNS_OTHER_PORT, pinfo); break; case ISNS_ATTR_TAG_PORTAL_GROUP_TAG: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_portal_group_tag, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_portal_group_tag, tag, len, function_id); break; case ISNS_ATTR_TAG_PORTAL_GROUP_INDEX: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_pg_index, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_pg_index, tag, len, function_id); break; case ISNS_ATTR_TAG_PORTAL_GROUP_NEXT_INDEX: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_pg_next_index, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_pg_next_index, tag, len, function_id); break; case ISNS_ATTR_TAG_FC_PORT_NAME_WWPN: if(len != 8) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_fc_port_name_wwpn, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_fc_port_name_wwpn, tag, len, function_id); break; case ISNS_ATTR_TAG_PORT_ID: if(len != 3) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_port_id, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_port_id, tag, len, function_id); break; case ISNS_ATTR_TAG_FC_PORT_TYPE: - offset = dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); + dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); break; /* 0x0000 Unidentified/Null Entry @@ -1279,38 +1293,38 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset, 0xFF12 iFCP Port */ case ISNS_ATTR_TAG_SYMBOLIC_PORT_NAME: - offset = dissect_isns_attr_string(tvb, offset, tree, hf_isns_symbolic_port_name, tag, len); + dissect_isns_attr_string(tvb, offset, tree, hf_isns_symbolic_port_name, tag, len); break; case ISNS_ATTR_TAG_FABRIC_PORT_NAME: if(len != 8) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_fabric_port_name, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_fabric_port_name, tag, len, function_id); break; case ISNS_ATTR_TAG_HARD_ADDRESS: if(len != 3) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_hard_address, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_hard_address, tag, len, function_id); break; case ISNS_ATTR_TAG_PORT_IP_ADDRESS: if(len != 16) THROW(ReportedBoundsError); - offset = dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_port_ip_addr, tag, len); + dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_port_ip_addr, tag, len); break; case ISNS_ATTR_TAG_CLASS_OF_SERVICE: - offset = dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); + dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); break; /* bit 29 Fibre Channel Class 2 Supported bit 28 Fibre Channel Class 3 Supported */ case ISNS_ATTR_TAG_FC4_TYPES: - offset = dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); + dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); break; case ISNS_ATTR_TAG_FC4_DESCRIPTOR: - offset = dissect_isns_attr_string(tvb, offset, tree, hf_isns_fc4_descriptor, tag, len); + dissect_isns_attr_string(tvb, offset, tree, hf_isns_fc4_descriptor, tag, len); break; case ISNS_ATTR_TAG_FC4_FEATURES: - offset = dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); + dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); break; case ISNS_ATTR_TAG_IFCP_SCN_BITMAP: - offset = dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); + dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); break; /* bit 24 INITIATOR AND SELF INFORMATION ONLY @@ -1323,7 +1337,7 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset, bit 31 (Lsb) DD/DDS MEMBER ADDED (Mgmt Reg/SCN only) */ case ISNS_ATTR_TAG_PORT_ROLE: - offset = dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); + dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); break; /* bit 29 Control @@ -1332,109 +1346,109 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset, */ case ISNS_ATTR_TAG_PERMANENT_PORT_NAME: if(len != 8) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_permanent_port_name, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_permanent_port_name, tag, len, function_id); break; case ISNS_ATTR_TAG_FC4_TYPE_CODE: - offset = dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); + dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); break; /* 8bit type code in byte0 */ case ISNS_ATTR_TAG_FC_NODE_NAME_WWNN: if(len != 8) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_fc_node_name_wwnn, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_fc_node_name_wwnn, tag, len, function_id); break; case ISNS_ATTR_TAG_SYMBOLIC_NODE_NAME: - offset = dissect_isns_attr_string(tvb, offset, tree, hf_isns_symbolic_node_name, tag, len); + dissect_isns_attr_string(tvb, offset, tree, hf_isns_symbolic_node_name, tag, len); break; case ISNS_ATTR_TAG_NODE_IP_ADDRESS: if(len != 16) THROW(ReportedBoundsError); - offset = dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_node_ip_addr, tag, len); + dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_node_ip_addr, tag, len); break; case ISNS_ATTR_TAG_NODE_IPA: if(len != 8) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_node_ipa, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_node_ipa, tag, len, function_id); break; case ISNS_ATTR_TAG_PROXY_ISCSI_NAME: - offset = dissect_isns_attr_string(tvb, offset, tree, hf_isns_proxy_iscsi_name, tag, len); + dissect_isns_attr_string(tvb, offset, tree, hf_isns_proxy_iscsi_name, tag, len); break; case ISNS_ATTR_TAG_SWITCH_NAME: if(len != 8) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_switch_name, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_switch_name, tag, len, function_id); break; case ISNS_ATTR_TAG_PREFERRED_ID: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_preferred_id, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_preferred_id, tag, len, function_id); break; case ISNS_ATTR_TAG_ASSIGNED_ID: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_assigned_id, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_assigned_id, tag, len, function_id); break; case ISNS_ATTR_TAG_VIRTUAL_FABRIC_ID: - offset = dissect_isns_attr_string(tvb, offset, tree, hf_isns_virtual_fabric_id, tag, len); + dissect_isns_attr_string(tvb, offset, tree, hf_isns_virtual_fabric_id, tag, len); break; case ISNS_ATTR_TAG_VENDOR_OUI: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_vendor_oui, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_vendor_oui, tag, len, function_id); break; case ISNS_ATTR_TAG_DD_SET_ID: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_set_id, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_set_id, tag, len, function_id); break; case ISNS_ATTR_TAG_DD_SET_SYMBOLIC_NAME: - offset = dissect_isns_attr_string(tvb, offset, tree, hf_isns_dd_set_symbolic_name, tag, len); + dissect_isns_attr_string(tvb, offset, tree, hf_isns_dd_set_symbolic_name, tag, len); break; case ISNS_ATTR_TAG_DD_SET_STATUS: - offset = dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); + dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); break; case ISNS_ATTR_TAG_DD_SET_NEXT_ID: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_set_next_id, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_set_next_id, tag, len, function_id); break; case ISNS_ATTR_TAG_DD_ID: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_id, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_id, tag, len, function_id); break; case ISNS_ATTR_TAG_DD_SYMBOLIC_NAME: - offset = dissect_isns_attr_string(tvb, offset, tree, hf_isns_dd_symbolic_name, tag, len); + dissect_isns_attr_string(tvb, offset, tree, hf_isns_dd_symbolic_name, tag, len); break; case ISNS_ATTR_TAG_DD_MEMBER_ISCSI_INDEX: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_member_iscsi_index, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_member_iscsi_index, tag, len, function_id); break; case ISNS_ATTR_TAG_DD_MEMBER_ISCSI_NAME: - offset = dissect_isns_attr_string(tvb, offset, tree, hf_isns_dd_member_iscsi_name, tag, len); + dissect_isns_attr_string(tvb, offset, tree, hf_isns_dd_member_iscsi_name, tag, len); break; case ISNS_ATTR_TAG_DD_MEMBER_FC_PORT_NAME: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_member_fc_port_name, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_member_fc_port_name, tag, len, function_id); break; case ISNS_ATTR_TAG_DD_MEMBER_PORTAL_INDEX: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_member_portal_index, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_member_portal_index, tag, len, function_id); break; case ISNS_ATTR_TAG_DD_MEMBER_PORTAL_IP_ADDRESS: if(len != 16) THROW(ReportedBoundsError); - offset = dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_dd_member_portal_ip_addr, tag, len); + dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_dd_member_portal_ip_addr, tag, len); break; case ISNS_ATTR_TAG_DD_MEMBER_PORTAL_PORT: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_port(tvb, offset, tree, hf_isns_dd_member_portal_port, + dissect_isns_attr_port(tvb, offset, tree, hf_isns_dd_member_portal_port, tag, len, ISNS_OTHER_PORT, pinfo); break; case ISNS_ATTR_TAG_DD_FEATURES: - offset = dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); + dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); break; case ISNS_ATTR_TAG_DD_ID_NEXT_ID: if(len != 4) THROW(ReportedBoundsError); - offset = dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_id_next_id, tag, len, function_id); + dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_id_next_id, tag, len, function_id); break; default: - offset = dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); + dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len); } /* move on the offset to next attribute */ - return offset; + return offset+len+8; } |