aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ieee802154.c
diff options
context:
space:
mode:
authorDevan Lai <devanl@davisinstruments.com>2019-09-19 15:05:19 -0700
committerAnders Broman <a.broman58@gmail.com>2019-10-03 10:49:25 +0000
commit610c7566f2d6fa2b0bec77427303af62fdedcc61 (patch)
tree7f1f456508ae51b0c0a911aaa17c8a4dca3f386c /epan/dissectors/packet-ieee802154.c
parentc9e897aeb9bf11437b6df2de65f252823c2a3d9f (diff)
ieee802154: handle IEEE 802.15.4e LE WUF
Wake-up frames in 802.15.4e have a specific structure that is not consistent with the fields present in a single-byte FCF. As a special case when 802154e_compatibility is enabled, detect multi-purpose frames that are exactly 12 bytes long and contain a Rendezvous Time IE and parse them as an 802.15.4e wake-up frame. Bug: 16102 Change-Id: I87c6317fffb0670dae0d5bdd499271fe02a40b22 Reviewed-on: https://code.wireshark.org/review/34684 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ieee802154.c')
-rw-r--r--epan/dissectors/packet-ieee802154.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c
index 4337670bfb..782aa18308 100644
--- a/epan/dissectors/packet-ieee802154.c
+++ b/epan/dissectors/packet-ieee802154.c
@@ -1541,6 +1541,22 @@ dissect_ieee802154_fcf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee
packet->ack_request = FALSE;
packet->ie_present = FALSE;
}
+
+ if (ieee802154e_compatibility) {
+ if (((tvb_reported_length(tvb) == IEEE802154E_LE_WUF_LEN)) && !packet->long_frame_control) {
+ /* Check if this is an IEEE 802.15.4e LE-multipurpose Wake-up Frame, which has a single-octet FCF
+ * and a static layout that cannot be inferred from the FCF alone. */
+ guint16 ie_header = tvb_get_letohs(tvb, (*offset) + 6);
+ guint16 id = (guint16)((ie_header & IEEE802154_HEADER_IE_ID_MASK) >> 7);
+ guint16 length = (guint16)(ie_header & IEEE802154_HEADER_IE_LENGTH_MASK);
+ if ((id == IEEE802154_HEADER_IE_RENDEZVOUS) && (length == 2)) {
+ /* This appears to be a WUF, as identified by containing a single
+ * Rendezvous Time Header IE with only a rendezvous time. */
+ packet->ie_present = TRUE;
+ packet->pan_id_present = TRUE;
+ }
+ }
+ }
}
else {
/* Standard 802.15.4 FCF */