From 8bc9f9ad5615c86f80ea319b77cd40ea893286ce Mon Sep 17 00:00:00 2001 From: sswsdev Date: Mon, 22 May 2017 17:57:58 +0300 Subject: UMTS FP: Fixed heuristic FACH dissector Dissector was not adding the correct TB size & TB count to the conversation info for the longer RACH variant (52 bytes long) Change-Id: Iace894929684af3e0eb9804cbc57cdc169f136a9 Reviewed-on: https://code.wireshark.org/review/21736 Reviewed-by: Michael Mann Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/dissectors/packet-umts_fp.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/epan/dissectors/packet-umts_fp.c b/epan/dissectors/packet-umts_fp.c index 73feb97dc6..baf8127e94 100644 --- a/epan/dissectors/packet-umts_fp.c +++ b/epan/dissectors/packet-umts_fp.c @@ -4284,7 +4284,7 @@ heur_dissect_fp_rach(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * } } - /* Expecting specific lengths: all rach frames are 28 bytes long */ + /* Expecting specific lengths: rach frames are either 28 or 52 bytes long */ /* This is the common Transport Formats of RACH ( See 3GPP TR 25.944 / 4.1.2.1 ) */ length = tvb_reported_length(tvb); if (length != 28 && length != 52) { @@ -4305,7 +4305,10 @@ heur_dissect_fp_rach(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * } tfi = tvb_get_guint8(tvb, 2) & 0x1f; - if (tfi != 0x00) { + if (length == 28 && tfi != 0x00) { + return FALSE; + } + if (length == 52 && tfi != 0x01) { return FALSE; } @@ -4338,12 +4341,9 @@ heur_dissect_fp_rach(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * umts_fp_conversation_info->num_dch_in_flow = 1; umts_fp_conversation_info->fp_dch_channel_info[0].num_ul_chans = 0; umts_fp_conversation_info->fp_dch_channel_info[0].ul_chan_num_tbs[0] = 1; - if (length == 28) { - umts_fp_conversation_info->fp_dch_channel_info[0].ul_chan_tf_size[0] = 168; - } - else { /* length is 52 */ - umts_fp_conversation_info->fp_dch_channel_info[0].ul_chan_tf_size[0] = 360; - } + umts_fp_conversation_info->fp_dch_channel_info[0].ul_chan_num_tbs[1] = 1; + umts_fp_conversation_info->fp_dch_channel_info[0].ul_chan_tf_size[0] = 168; + umts_fp_conversation_info->fp_dch_channel_info[0].ul_chan_tf_size[1] = 360; /* Adding the 'channel specific info' for RACH */ fp_rach_channel_info = wmem_new0(wmem_file_scope(), fp_rach_channel_info_t); -- cgit v1.2.1