aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ieee802154.c
diff options
context:
space:
mode:
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>2009-09-11 16:58:21 +0000
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>2009-09-11 16:58:21 +0000
commit57bf2ba2bcdc69d1cd0341409d8c9914cd2d510f (patch)
tree3361178263445d66b4d1cc01c5284631884ed28a /epan/dissectors/packet-ieee802154.c
parentd07a2901613f2d49a4e31a998a1ddad9bf32025f (diff)
From Jean-François Wauthy:
Dissect the Auxiliary Security Header for IEEE 802.15.4-2006 only. Also Auxiliary Security Header dissection endianness bugfix. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29864 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-ieee802154.c')
-rw-r--r--epan/dissectors/packet-ieee802154.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c
index 69bbd492fc..5682f8eb91 100644
--- a/epan/dissectors/packet-ieee802154.c
+++ b/epan/dissectors/packet-ieee802154.c
@@ -809,7 +809,8 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
* AUXILIARY SECURITY HEADER
*=====================================================
*/
- if (packet->security_enable) {
+ /* The Auxiliary Security Header only exists in IEEE 802.15.4-2006 */
+ if (packet->security_enable && (packet->version == 1)) {
proto_item *ti;
proto_tree *header_tree, *field_tree;
@@ -844,7 +845,7 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
header_tree = proto_item_add_subtree(ti, ett_ieee802154_auxiliary_security);
/* Security Control Field */
- ti = proto_tree_add_text(header_tree, tvb, offset, sizeof (guint8), "Security Control Field");
+ ti = proto_tree_add_text(header_tree, tvb, offset, sizeof (guint8), "Security Control Field (0x%02x)", security_control);
field_tree = proto_item_add_subtree(ti, ett_ieee802154_aux_sec_control);
proto_tree_add_uint(field_tree, hf_ieee802154_security_level, tvb, offset, sizeof(guint8), sec_level);
@@ -854,7 +855,7 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
offset++;
/* Frame Counter Field */
- frame_counter = tvb_get_ntohl (tvb, offset);
+ frame_counter = tvb_get_letohl (tvb, offset);
proto_tree_add_uint(header_tree, hf_ieee802154_aux_sec_frame_counter, tvb, offset, sizeof(guint32), frame_counter);