From b19b729ff4a65c6ad90dc7dbc57c0f2b5be55908 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 25 Aug 2015 16:56:37 -0700 Subject: Explain why the MSDU length field in an A-MSDU is big-endian. Change-Id: I4a1cfd09395860348d71e9f4c86b6343cfdcd02a Reviewed-on: https://code.wireshark.org/review/10262 Reviewed-by: Guy Harris (cherry picked from commit 5e45269bf6830f877aadaae1a8290c926f7bcb82) Reviewed-on: https://code.wireshark.org/review/10264 --- epan/dissectors/packet-ieee80211.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index 51f7ea700d..44202f2eb0 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -17519,6 +17519,16 @@ dissect_ieee80211_common (tvbuff_t *tvb, packet_info *pinfo, guint16 msdu_length; proto_tree *subframe_tree; + /* + * IEEE Std 802.11-2012 says, in section 8.3.2.2 "A-MSDU format": + * + * The A-MSDU subframe header contains three fields: DA, SA, and + * Length. The order of these fields and the bits within these + * fields are the same as the IEEE 802.3 frame format. + * + * which means that the length field is big-endian, not + * little-endian. + */ msdu_length = tvb_get_ntohs (next_tvb, msdu_offset+12); parent_item = proto_tree_add_item(mpdu_tree, hf_ieee80211_amsdu_subframe, next_tvb, -- cgit v1.2.1