From 89e6b95d131f7d1d25a8a3bb63a90e5b3f76e2dc Mon Sep 17 00:00:00 2001 From: martinm Date: Mon, 19 Jul 2010 14:14:47 +0000 Subject: 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... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33582 f5534014-38df-0310-8fa8-9805f1628bb7 --- 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, -- cgit v1.2.3