diff options
author | Andoni Diaz de Cerio <andoni.diazdecerio@nemergent-solutions.com> | 2022-06-13 09:32:04 +0200 |
---|---|---|
committer | A Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2022-06-13 19:08:07 +0000 |
commit | 1ec142231870d115793c860462cb97eea0ffa2db (patch) | |
tree | d00c97dd24fcef919137c47d16385d3ec3f880d4 /epan | |
parent | 9d17919f2a08fb8c78b649809256975dd8ae3f2b (diff) |
MCPTT: Fix dissection of Track Info field
Unlike most of the FC fields, Track info participant type string file
padding is not considered in the dissector. This causes that all the FC
message dissection fails the string contains padding.
According to ETSI TS 24.380 Section 8.2.3.13:
If the length of the <Participant Type> value is not a multiple
of 4 bytes, the <Participant Type> value is padded to a
multiple of 4 bytes. The value of the padding bytes is set to zero.
The padding bytes are ignored by the receiver.
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-rtcp.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c index 618d964b8b..d044913ae2 100644 --- a/epan/dissectors/packet-rtcp.c +++ b/epan/dissectors/packet-rtcp.c @@ -2610,9 +2610,19 @@ dissect_rtcp_app_mcpt(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree* proto_tree_add_item_ret_uint(sub_tree, hf_rtcp_mcptt_part_type_len, tvb, offset, 1, ENC_BIG_ENDIAN, &fld_len); offset += 1; rem_len -= 1; + int part_type_padding = (4 - (fld_len % 4)); proto_tree_add_item(sub_tree, hf_rtcp_mcptt_participant_type, tvb, offset, fld_len, ENC_UTF_8 | ENC_NA); offset += fld_len; rem_len -= fld_len; + if(part_type_padding > 0){ + guint32 data; + proto_tree_add_item_ret_uint(sub_tree, hf_rtcp_app_data_padding, tvb, offset, part_type_padding, ENC_BIG_ENDIAN, &data); + if (data != 0) { + proto_tree_add_expert(sub_tree, pinfo, &ei_rtcp_appl_non_zero_pad, tvb, offset, part_type_padding); + } + offset += part_type_padding; + rem_len -= part_type_padding; + } if (rem_len > 0) { num_ref = 1; /* Floor Participant Reference */ |