aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mac-lte.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2018-02-22 12:06:53 +0000
committerAnders Broman <a.broman58@gmail.com>2018-02-23 05:14:24 +0000
commit86f329aa940388d981b25c2b3c966313335c2ed9 (patch)
treea3a478749bc506e353214c3fea0c4762b9d3b211 /epan/dissectors/packet-mac-lte.c
parent1ccfef8b3fca63cbdd7839ebf205bd6d1f7193bb (diff)
LTE MAC: check direction and lcid before looking up msg3 table
Change-Id: I26238e96510e9ccb73ebc4b6c4e8e9e5bc724a91 Reviewed-on: https://code.wireshark.org/review/25991 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-mac-lte.c')
-rw-r--r--epan/dissectors/packet-mac-lte.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c
index c0530246c9..8558f4ffce 100644
--- a/epan/dissectors/packet-mac-lte.c
+++ b/epan/dissectors/packet-mac-lte.c
@@ -19,7 +19,6 @@
#include "config.h"
-
#include <epan/packet.h>
#include <epan/exceptions.h>
#include <epan/expert.h>
@@ -3548,7 +3547,7 @@ static void TrackReportedDLHARQResend(packet_info *pinfo, tvbuff_t *tvb, int len
DLHARQResult *result = NULL;
DLHARQResult *original_result = NULL;
- /* If don't have detailed DL PHy info, just give up */
+ /* If don't have detailed DL PHY info, just give up */
if (!p_mac_lte_info->detailed_phy_info.dl_info.present) {
return;
}
@@ -6041,12 +6040,17 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Was this a Msg3 that led to a CR answer? */
if (PINFO_FD_VISITED(pinfo)) {
- guint32 cr_frame = GPOINTER_TO_UINT (g_hash_table_lookup(mac_lte_msg3_cr_hash,
- GUINT_TO_POINTER(pinfo->num)));
- if (cr_frame != 0) {
- proto_item *cr_ti = proto_tree_add_uint(tree, hf_mac_lte_control_msg3_to_cr,
- tvb, 0, 0, cr_frame);
- PROTO_ITEM_SET_GENERATED(cr_ti);
+ if ((p_mac_lte_info->direction == DIRECTION_UPLINK) &&
+ (number_of_headers >= 1) &&
+ (lcids[0] == 0)) {
+
+ guint32 cr_frame = GPOINTER_TO_UINT (g_hash_table_lookup(mac_lte_msg3_cr_hash,
+ GUINT_TO_POINTER(pinfo->num)));
+ if (cr_frame != 0) {
+ proto_item *cr_ti = proto_tree_add_uint(tree, hf_mac_lte_control_msg3_to_cr,
+ tvb, 0, 0, cr_frame);
+ PROTO_ITEM_SET_GENERATED(cr_ti);
+ }
}
}