From 982fc7184d46621948e53b485c7504c9d11f3350 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 17 May 2024 17:00:59 +0200 Subject: Merging upstream version 4.2.5. Signed-off-by: Daniel Baumann --- epan/dissectors/packet-btmesh.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'epan/dissectors/packet-btmesh.c') diff --git a/epan/dissectors/packet-btmesh.c b/epan/dissectors/packet-btmesh.c index 8aa913d..a0d930f 100644 --- a/epan/dissectors/packet-btmesh.c +++ b/epan/dissectors/packet-btmesh.c @@ -4779,6 +4779,7 @@ dissect_btmesh_model_layer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *manufacturer_property_ids_tree; proto_tree *generic_client_property_ids_tree; proto_tree *sensor_setting_property_ids_tree; + proto_tree *root_tree = proto_tree_get_parent_tree(tree); guint32 netkeyindexes, appkeyindexes; guint32 nums, numv, element; @@ -4794,17 +4795,17 @@ dissect_btmesh_model_layer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if (opcode & 0x40) { /* Vendor opcode */ proto_tree_add_item(sub_tree, hf_btmesh_model_layer_vendor_opcode, tvb, offset, 1, ENC_NA); - vendor = tvb_get_guint16(tvb, offset + 1, ENC_BIG_ENDIAN); + vendor = tvb_get_guint16(tvb, offset + 1, ENC_LITTLE_ENDIAN); proto_tree_add_item(sub_tree, hf_btmesh_model_layer_vendor, tvb, offset + 1, 2, ENC_LITTLE_ENDIAN); payload_tvb = tvb_new_subset_remaining(tvb, offset); - dissector_try_uint_new(btmesh_model_vendor_dissector_table, vendor, payload_tvb, pinfo, tree, TRUE, GUINT_TO_POINTER(vendor)); col_set_str(pinfo->cinfo, COL_INFO, "Access Message - Vendor Opcode"); + dissector_try_uint_new(btmesh_model_vendor_dissector_table, vendor, payload_tvb, pinfo, root_tree, TRUE, GUINT_TO_POINTER(vendor)); offset+=3; } else { - /* Two octet opcode */ - proto_tree_add_item_ret_uint(sub_tree, hf_btmesh_model_layer_opcode, tvb, offset, 2, ENC_NA, &opcode); - col_set_str(pinfo->cinfo, COL_INFO, val_to_str_const(opcode, btmesh_models_opcode_vals, "Access Message Unknown")); - offset+=2; + /* Two octet opcode */ + proto_tree_add_item_ret_uint(sub_tree, hf_btmesh_model_layer_opcode, tvb, offset, 2, ENC_NA, &opcode); + col_set_str(pinfo->cinfo, COL_INFO, val_to_str_const(opcode, btmesh_models_opcode_vals, "Access Message Unknown")); + offset+=2; } } else { /* One octet opcode */ -- cgit v1.2.3