From ad274d0542e598d1d640a86fa9209e2b881b339a Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Tue, 27 Jun 2006 13:51:13 +0000 Subject: [PATCH] make the called subdissectors create their protocol expansion at the first level of the tree and not deep inside the SSL layer makes the traces much more readable svn path=/trunk/; revision=18583 --- epan/dissectors/packet-ssl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/epan/dissectors/packet-ssl.c b/epan/dissectors/packet-ssl.c index 31792f5706..583647e867 100644 --- a/epan/dissectors/packet-ssl.c +++ b/epan/dissectors/packet-ssl.c @@ -115,6 +115,11 @@ static gboolean ssl_desegment = TRUE; static gboolean ssl_desegment_app_data = TRUE; +/* we need to remember the top tree so that subdissectors we call are created + * at the root and not deep down inside the SSL decode + */ +static proto_tree *top_tree; + /********************************************************************* * @@ -864,6 +869,8 @@ dissect_ssl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) SslDecryptSession* ssl_session = NULL; guint* conv_version; + top_tree=tree; + /* Track the version using conversations to reduce the * chance that a packet that simply *looks* like a v2 or * v3 packet is dissected improperly. This also allows @@ -1451,7 +1458,7 @@ dissect_ssl3_record(tvbuff_t *tvb, packet_info *pinfo, ssl_debug_printf("dissect_ssl3_record found association %p\n", association); ssl_print_text_data("decrypted app data",pi->app_data.data, pi->app_data.data_len); - call_dissector(association->handle, new_tvb, pinfo, ssl_record_tree); + call_dissector(association->handle, new_tvb, pinfo, top_tree); } /* add raw decrypted data only if a decoder is not found*/ else