summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-ssl-utils.c
diff options
context:
space:
mode:
authorIrene Ruengeler <ruengeler@wireshark.org>2017-05-08 09:04:16 +0200
committerMichael Mann <mmann78@netscape.net>2017-06-02 01:19:02 +0000
commite1f84f985eb4920bc3c0b58ca583bca1d2e93b1c (patch)
treee105e10d80c825eae5c58e139736ab4d64f2be24 /epan/dissectors/packet-ssl-utils.c
parent653fc958979032009e0dd2bdfe2a23c338311805 (diff)
downloadwireshark-e1f84f985eb4920bc3c0b58ca583bca1d2e93b1c.tar.gz
Fix Decode As for protocols that may use tunneling.
Dissectors that rely on pinfo structure information may have the data overwritten if the data is tunneled. Address it by using proto data that is based on pinfo->curr_layer_num. Bug: 13746 Change-Id: I1c29f26a3c49f368876f0e96908705bc9c099ce1 Reviewed-on: https://code.wireshark.org/review/21559 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-ssl-utils.c')
-rw-r--r--epan/dissectors/packet-ssl-utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c
index 0de394fe9b..ea527cee00 100644
--- a/epan/dissectors/packet-ssl-utils.c
+++ b/epan/dissectors/packet-ssl-utils.c
@@ -4873,10 +4873,12 @@ ssl_add_record_info(gint proto, packet_info *pinfo, const guchar *data, gint dat
SslRecordInfo* rec, **prec;
SslPacketInfo* pi;
- pi = (SslPacketInfo *)p_get_proto_data(wmem_file_scope(), pinfo, proto, 0);
+ pi = (SslPacketInfo *)p_get_proto_data(wmem_file_scope(), pinfo, proto, pinfo->curr_layer_num);
if (!pi)
{
pi = wmem_new0(wmem_file_scope(), SslPacketInfo);
+ pi->srcport = pinfo->srcport;
+ pi->destport = pinfo->destport;
p_add_proto_data(wmem_file_scope(), pinfo, proto, 0, pi);
}
@@ -4910,7 +4912,7 @@ ssl_get_record_info(tvbuff_t *parent_tvb, int proto, packet_info *pinfo, gint re
{
SslRecordInfo* rec;
SslPacketInfo* pi;
- pi = (SslPacketInfo *)p_get_proto_data(wmem_file_scope(), pinfo, proto, 0);
+ pi = (SslPacketInfo *)p_get_proto_data(wmem_file_scope(), pinfo, proto, pinfo->curr_layer_num);
if (!pi)
return NULL;