aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dtls.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2015-10-20 18:41:46 +0200
committerMichael Mann <mmann78@netscape.net>2015-10-27 21:47:57 +0000
commit7a9237fb21ac2c771a741f1baaab762354e23c24 (patch)
treedd438b64d0bdeb34cfa673776fe2ece80db7ebb2 /epan/dissectors/packet-dtls.c
parent8869d57c75abaedf1ca566a7c3487557c75fc020 (diff)
[ssl] dissect handshake messages even if we have no tree
this is to make sure that all expert info we see in the main window will also appear in the expert info window the sample capture from bug 11561 shows this problem: without this patch, the expert info with severity 'error' don't show up in the expert info window Change-Id: Ia71ae7e248f57bf1344cf722ac57e74c517828d5 Reviewed-on: https://code.wireshark.org/review/11246 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-dtls.c')
-rw-r--r--epan/dissectors/packet-dtls.c39
1 files changed, 17 insertions, 22 deletions
diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c
index c07082db61..512c47d777 100644
--- a/epan/dissectors/packet-dtls.c
+++ b/epan/dissectors/packet-dtls.c
@@ -1104,6 +1104,7 @@ dissect_dtls_handshake(tvbuff_t *tvb, packet_info *pinfo,
guint32 fragment_length;
gboolean first_iteration;
guint32 reassembled_length;
+ tvbuff_t *sub_tvb;
msg_type_str = NULL;
first_iteration = TRUE;
@@ -1302,35 +1303,31 @@ dissect_dtls_handshake(tvbuff_t *tvb, packet_info *pinfo,
}
}
- if (ssl_hand_tree || ssl)
+ if (fragmented && !new_tvb)
{
- tvbuff_t *sub_tvb = NULL;
-
- if (fragmented && !new_tvb)
- {
- /* Skip fragmented messages not reassembled yet */
- continue;
- }
+ /* Skip fragmented messages not reassembled yet */
+ continue;
+ }
- if (new_tvb)
- {
- sub_tvb = new_tvb;
- }
- else
- {
- sub_tvb = tvb_new_subset_length(tvb, offset, fragment_length);
- }
+ if (new_tvb)
+ {
+ sub_tvb = new_tvb;
+ }
+ else
+ {
+ sub_tvb = tvb_new_subset_length(tvb, offset, fragment_length);
+ }
- /* now dissect the handshake message, if necessary */
- switch ((HandshakeType) msg_type) {
+ /* now dissect the handshake message, if necessary */
+ switch ((HandshakeType) msg_type) {
case SSL_HND_HELLO_REQUEST:
/* hello_request has no fields, so nothing to do! */
break;
case SSL_HND_CLIENT_HELLO:
if (ssl) {
- /* ClientHello is first packet so set direction */
- ssl_set_server(session, &pinfo->dst, pinfo->ptype, pinfo->destport);
+ /* ClientHello is first packet so set direction */
+ ssl_set_server(session, &pinfo->dst, pinfo->ptype, pinfo->destport);
}
ssl_dissect_hnd_cli_hello(&dissect_dtls_hf, sub_tvb, pinfo,
ssl_hand_tree, 0, length, session, ssl,
@@ -1401,8 +1398,6 @@ dissect_dtls_handshake(tvbuff_t *tvb, packet_info *pinfo,
case SSL_HND_ENCRYPTED_EXTS:
/* TODO: does this need further dissection? */
break;
- }
-
}
}
}