diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-03-21 06:23:33 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-03-21 06:23:33 +0000 |
commit | 6090a6c6590bd034a50ab4a3e183fe7708324c16 (patch) | |
tree | dace7fad1ff4e376ac09189e809b01bddf9ce586 | |
parent | 4690f02928eefd414cb030e27600ee0772c022d1 (diff) |
From Jason Damori: packet-ieee1722.c calls subdissectors too late in dissection https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6974
svn path=/trunk/; revision=41711
-rw-r--r-- | epan/dissectors/packet-ieee1722.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/epan/dissectors/packet-ieee1722.c b/epan/dissectors/packet-ieee1722.c index 68f7d04d86..d229f4fa94 100644 --- a/epan/dissectors/packet-ieee1722.c +++ b/epan/dissectors/packet-ieee1722.c @@ -151,17 +151,21 @@ dissect_1722(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(ieee1722_tree, hf_1722_svfield, tvb, IEEE_1722_VERSION_OFFSET, 1, ENC_BIG_ENDIAN); proto_tree_add_item(ieee1722_tree, hf_1722_verfield, tvb, IEEE_1722_VERSION_OFFSET, 1, ENC_BIG_ENDIAN); - proto_tree_add_item(ieee1722_tree, hf_1722_mrfield, tvb, IEEE_1722_VERSION_OFFSET, 1, ENC_BIG_ENDIAN); - proto_tree_add_item(ieee1722_tree, hf_1722_gvfield, tvb, IEEE_1722_VERSION_OFFSET, 1, ENC_BIG_ENDIAN); - proto_tree_add_item(ieee1722_tree, hf_1722_tvfield, tvb, IEEE_1722_VERSION_OFFSET, 1, ENC_BIG_ENDIAN); + } + - /* Version field ends the common AVTPDU. Now parse the specfic packet type */ - subtype = tvb_get_guint8(tvb, IEEE_1722_CD_OFFSET); - subtype &= 0x7F; + /* Version field ends the common AVTPDU. Now parse the specfic packet type */ + subtype = tvb_get_guint8(tvb, IEEE_1722_CD_OFFSET); + subtype &= 0x7F; - /* call subtype dissectors for 1722.1 */ - if (dissector_try_uint(avb_dissector_table, subtype, tvb, pinfo, tree)) return; + /* call any registered subtype dissectors which use only the common AVTPDU (e.g. 1722.1 and MAAP) */ + if (dissector_try_uint(avb_dissector_table, subtype, tvb, pinfo, tree)) return; + if (tree) { + proto_tree_add_item(ieee1722_tree, hf_1722_mrfield, tvb, IEEE_1722_VERSION_OFFSET, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(ieee1722_tree, hf_1722_gvfield, tvb, IEEE_1722_VERSION_OFFSET, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(ieee1722_tree, hf_1722_tvfield, tvb, IEEE_1722_VERSION_OFFSET, 1, ENC_BIG_ENDIAN); + /* Add the rest of the packet fields */ proto_tree_add_item(ieee1722_tree, hf_1722_seqnum, tvb, IEEE_1722_SEQ_NUM_OFFSET, 1, ENC_BIG_ENDIAN); |