IEEE 802.15.4: Add PAN ID when flag is set

According to IEEE 802.15.4-2020 Section 7.3.5.1 Destination PAN ID field is
present when PAN ID Present bit is set. Therefore we should check for the bit.

Fixes: wireshark/wireshark#17496
This commit is contained in:
Uli Heilmeier 2021-09-04 11:17:08 +02:00
parent 8ef6f04f5a
commit 86d5606be3
1 changed files with 1 additions and 0 deletions

View File

@ -1624,6 +1624,7 @@ dissect_ieee802154_fcf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee
/* The second octet of the FCF is only present if the long frame control bit is set */
if (packet->long_frame_control) {
packet->pan_id_present = (fcf & IEEE802154_MPF_FCF_PAN_ID_PRESENT) >> 8;
packet->security_enable = (fcf & IEEE802154_MPF_FCF_SEC_EN) >> 9;
packet->seqno_suppression = (fcf & IEEE802154_MPF_FCF_SEQNO_SUPPRESSION) >> 10;
packet->frame_pending = (fcf & IEEE802154_MPF_FCF_FRAME_PND) >> 11;