aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2017-08-19 23:59:02 +0200
committerStig Bjørlykke <stig@bjorlykke.org>2017-08-19 22:00:09 +0000
commit1a38472d047893bc91fb9fd82d1e641a7b1c03ad (patch)
treef4df2b0025ffa34fcb9f5dd5cb08d33f1f0524b8 /epan
parent50510a670d1ba15973d6c895eccfc0754af2852d (diff)
nordic_ble: Preserve legacy version support
Change-Id: I8354955f802ba47158b78358084cd4211c1c6d79 Reviewed-on: https://code.wireshark.org/review/23137 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-nordic_ble.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/epan/dissectors/packet-nordic_ble.c b/epan/dissectors/packet-nordic_ble.c
index 80609987ca..bdf5037d8e 100644
--- a/epan/dissectors/packet-nordic_ble.c
+++ b/epan/dissectors/packet-nordic_ble.c
@@ -334,12 +334,14 @@ dissect_packet_header(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree
}
static gint
-dissect_packet(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, btle_context_t *context, guint8 packet_len)
+dissect_packet(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, gboolean legacy_mode, btle_context_t *context, guint8 packet_len)
{
gint32 rssi;
- proto_tree_add_item(tree, hf_nordic_ble_packet_length, tvb, offset, 1, ENC_NA);
- offset += 1;
+ if (!legacy_mode) {
+ proto_tree_add_item(tree, hf_nordic_ble_packet_length, tvb, offset, 1, ENC_NA);
+ offset += 1;
+ }
offset = dissect_flags(tvb, offset, pinfo, tree, context);
@@ -379,7 +381,7 @@ dissect_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, btle_context
}
offset = dissect_packet_header(tvb, offset, pinfo, nordic_ble_tree, legacy_mode, bad_length, &packet_len);
- offset = dissect_packet(tvb, offset, pinfo, nordic_ble_tree, context, packet_len);
+ offset = dissect_packet(tvb, offset, pinfo, nordic_ble_tree, legacy_mode, context, packet_len);
proto_item_set_len(ti, offset);