aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-nas_eps.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2021-02-07 15:07:48 +0100
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-02-08 09:45:49 +0000
commit37bef583dac539dd66e50c9f34a46563928356d2 (patch)
tree3fb06ba9243c9b59337abf7ab6fd9735a4a38bb9 /epan/dissectors/packet-nas_eps.c
parent1684ff0b4a5b858fc31834033c19cc91e7f2fd65 (diff)
NAS: Put decoded user data in the top tree
Decoded user data as IP or Ethernet belongs in the top tree.
Diffstat (limited to 'epan/dissectors/packet-nas_eps.c')
-rw-r--r--epan/dissectors/packet-nas_eps.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-nas_eps.c b/epan/dissectors/packet-nas_eps.c
index 1565728fcd..52c2d40449 100644
--- a/epan/dissectors/packet-nas_eps.c
+++ b/epan/dissectors/packet-nas_eps.c
@@ -3855,11 +3855,9 @@ de_esm_user_data_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
it = proto_tree_add_item(tree, hf_nas_eps_esm_user_data_cont, tvb, offset, len, ENC_NA);
if (g_nas_eps_decode_user_data_container_as != DECODE_USER_DATA_AS_NONE) {
- proto_tree *subtree;
tvbuff_t *user_data_cont_tvb;
volatile dissector_handle_t handle;
- subtree = proto_item_add_subtree(it, ett_nas_eps_esm_user_data_cont);
user_data_cont_tvb = tvb_new_subset_length_caplen(tvb, offset, len, len);
if (g_nas_eps_decode_user_data_container_as == DECODE_USER_DATA_AS_IP) {
guint8 first_byte = tvb_get_guint8(user_data_cont_tvb, 0);
@@ -3880,9 +3878,11 @@ de_esm_user_data_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
col_append_str(pinfo->cinfo, COL_INFO, ", ");
col_set_fence(pinfo->cinfo, COL_INFO);
TRY {
- call_dissector_only(handle, user_data_cont_tvb, pinfo, subtree, NULL);
+ proto_tree *toptree = proto_tree_get_root(tree);
+ call_dissector_only(handle, user_data_cont_tvb, pinfo, toptree, NULL);
} CATCH_BOUNDS_ERRORS {
/* Dissection exception: message was probably non IP and heuristic was too weak */
+ proto_tree *subtree = proto_item_add_subtree(it, ett_nas_eps_esm_user_data_cont);
show_exception(user_data_cont_tvb, pinfo, subtree, EXCEPT_CODE, GET_MESSAGE);
} ENDTRY
}