summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2017-06-02 10:52:56 +0200
committerMichael Mann <mmann78@netscape.net>2017-06-02 12:01:20 +0000
commit6f255da358f9213f89c7c4001229e498f19e820e (patch)
tree8bb2fda0a3a21db9c5c17f95d2381dded596fe7c
parente4c15408defbb6ae46b81b90943bb56795e08875 (diff)
downloadwireshark-6f255da358f9213f89c7c4001229e498f19e820e.tar.gz
ssl-utils: fix regression in decryption and Follow SSL Stream
Store SslPacketInfo under the same key as used by p_get_proto_data and pass this data to the Follow SSL tap. Change-Id: If9b97d0e0e2a82562abe6cb9e61986744680066d Fixes: v2.3.0rc0-3740-ge1f84f985e ("Fix Decode As for protocols that may use tunneling.") Reviewed-on: https://code.wireshark.org/review/21893 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--epan/dissectors/packet-ssl-utils.c2
-rw-r--r--epan/dissectors/packet-ssl.c9
2 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c
index ea527cee00..91b2f86648 100644
--- a/epan/dissectors/packet-ssl-utils.c
+++ b/epan/dissectors/packet-ssl-utils.c
@@ -4879,7 +4879,7 @@ ssl_add_record_info(gint proto, packet_info *pinfo, const guchar *data, gint dat
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);
+ p_add_proto_data(wmem_file_scope(), pinfo, proto, pinfo->curr_layer_num, pi);
}
rec = wmem_new(wmem_file_scope(), SslRecordInfo);
diff --git a/epan/dissectors/packet-ssl.c b/epan/dissectors/packet-ssl.c
index f49732f178..8d23edf3ec 100644
--- a/epan/dissectors/packet-ssl.c
+++ b/epan/dissectors/packet-ssl.c
@@ -659,6 +659,7 @@ dissect_ssl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
SslDecryptSession *ssl_session;
SslSession *session;
gint is_from_server;
+ guint8 curr_layer_num_ssl = pinfo->curr_layer_num;
ti = NULL;
ssl_tree = NULL;
@@ -840,8 +841,8 @@ dissect_ssl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
if (need_desegmentation) {
ssl_debug_printf(" need_desegmentation: offset = %d, reported_length_remaining = %d\n",
offset, tvb_reported_length_remaining(tvb, offset));
- /* XXX: this seems unused due to new "Follow SSL" method, remove? */
- tap_queue_packet(ssl_tap, pinfo, p_get_proto_data(wmem_file_scope(), pinfo, proto_ssl, 0));
+ /* Make data available to ssl_follow_tap_listener */
+ tap_queue_packet(ssl_tap, pinfo, p_get_proto_data(wmem_file_scope(), pinfo, proto_ssl, curr_layer_num_ssl));
return tvb_captured_length(tvb);
}
}
@@ -850,8 +851,8 @@ dissect_ssl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
ssl_debug_flush();
- /* XXX: this seems unused due to new "Follow SSL" method, remove? */
- tap_queue_packet(ssl_tap, pinfo, p_get_proto_data(wmem_file_scope(), pinfo, proto_ssl, 0));
+ /* Make data available to ssl_follow_tap_listener */
+ tap_queue_packet(ssl_tap, pinfo, p_get_proto_data(wmem_file_scope(), pinfo, proto_ssl, curr_layer_num_ssl));
return tvb_captured_length(tvb);
}