From 703635b9796d77cc9ff16671a598a9af1a7aff53 Mon Sep 17 00:00:00 2001 From: Martin Mathieson Date: Mon, 19 Jul 2010 14:14:47 +0000 Subject: [PATCH] Give up dissecting a MAC PDU if we see control LCIDs after data ones. This saves us getting into a mess trying to keep track of PDU sizes in an array... svn path=/trunk/; revision=33582 --- epan/dissectors/packet-mac-lte.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c index b6c0ef3b08..c1278ad53b 100644 --- a/epan/dissectors/packet-mac-lte.c +++ b/epan/dissectors/packet-mac-lte.c @@ -2119,6 +2119,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree expert_add_info_format(pinfo, lcid_ti, PI_MALFORMED, PI_ERROR, "%cL-SCH Control subheaders should not appear after data subheaders", (p_mac_lte_info->direction == DIRECTION_UPLINK) ? 'U' : 'D'); + return; } /* Show an expert item if we're seeing more then one BSR in a frame */ @@ -2126,6 +2127,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree if (have_seen_bsr) { expert_add_info_format(pinfo, lcid_ti, PI_MALFORMED, PI_ERROR, "There shouldn't be > 1 BSR in a frame"); + return; } have_seen_bsr = TRUE; } @@ -2669,7 +2671,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree } /* LCID 1 and 2 can be assumed to be srb1&2, so can dissect as RLC AM */ - if ((lcids[n] == 1) || (lcids[n] == 2)) { + else if ((lcids[n] == 1) || (lcids[n] == 2)) { if (global_mac_lte_attempt_srb_decode) { /* Call RLC dissector */ call_rlc_dissector(tvb, pinfo, tree, pdu_ti, offset, data_length,