diff options
author | Michael Mann <mmann78@netscape.net> | 2014-04-06 13:38:11 -0400 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-04-06 21:25:47 +0000 |
commit | f06cdf3a838b072b1ce3883f2f92796c5863273e (patch) | |
tree | e090a949307c6d989eac0efdabbafd2f23dd8ea8 /epan/dissectors/packet-zbee-nwk-gp.c | |
parent | 4eaec3cc7810dd680b044c11d74739410f407cc0 (diff) |
Tweak ZigBee GreenPower heuristic to more closely match ZigBee NWK heuristic. Bug 9956
Change-Id: I2c4d26ee27684d1f18c39add249b9cd116cf6f71
Reviewed-on: https://code.wireshark.org/review/985
Reviewed-by: Michael Mann <mmann78@netscape.net>
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-zbee-nwk-gp.c')
-rw-r--r-- | epan/dissectors/packet-zbee-nwk-gp.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-zbee-nwk-gp.c b/epan/dissectors/packet-zbee-nwk-gp.c index 9b3086b85b..e094594b2a 100644 --- a/epan/dissectors/packet-zbee-nwk-gp.c +++ b/epan/dissectors/packet-zbee-nwk-gp.c @@ -1423,26 +1423,26 @@ dissect_zbee_nwk_heur_gp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo { ieee802154_packet *packet = (ieee802154_packet *)data; + /* All ZigBee frames must always have a 16-bit source address. */ + if ( (packet == NULL) || + (packet->src_addr_mode != IEEE802154_FCF_ADDR_SHORT) ) { + return FALSE; + } + /* Skip ZigBee beacons. */ if ((packet->frame_type == IEEE802154_FCF_BEACON) && (tvb_get_guint8(tvb, 0) == ZBEE_NWK_BEACON_PROCOL_ID)) return FALSE; if (packet->dst_pan == IEEE802154_BCAST_PAN && packet->dst_addr_mode == IEEE802154_FCF_ADDR_SHORT && - packet->dst16 == IEEE802154_BCAST_ADDR && packet->frame_type != IEEE802154_FCF_BEACON && - packet->src_addr_mode != IEEE802154_FCF_ADDR_SHORT) { + packet->dst16 == IEEE802154_BCAST_ADDR && packet->frame_type != IEEE802154_FCF_BEACON) { dissect_zbee_nwk_gp(tvb, pinfo, tree, data); return TRUE; } /* 64-bit destination addressing mode support. */ - if (packet->dst_addr_mode == IEEE802154_FCF_ADDR_EXT && packet->frame_type != IEEE802154_FCF_BEACON && - packet->src_addr_mode != IEEE802154_FCF_ADDR_SHORT) { + if (packet->dst_addr_mode == IEEE802154_FCF_ADDR_EXT && packet->frame_type != IEEE802154_FCF_BEACON) { dissect_zbee_nwk_gp(tvb, pinfo, tree, data); return TRUE; } - /* All ZigBee 2006, 2007 and PRO frames must always have a 16-bit source address. */ - if (packet->src_addr_mode != IEEE802154_FCF_ADDR_SHORT) { - return TRUE; - } return FALSE; } /* dissect_zbee_nwk_heur_gp */ |