tls: Show reassembled in for the first fragment

Similar to TCP, properly display what frame a fragmented
TLS message was reassembled_in for the first fragment on
a second pass. Also similar to TCP, don't bother to add the
reassembled_in field for fragments that are reassembled
in the same frame.
This commit is contained in:
John Thacker 2022-07-19 22:04:00 -04:00 committed by A Wireshark GitLab Utility
parent 3a57dd522b
commit 0b780341cb
1 changed files with 14 additions and 1 deletions

View File

@ -1248,6 +1248,7 @@ again:
*/
if ((msp = (struct tcp_multisegment_pdu *)wmem_tree_lookup32(flow->multisegment_pdus, seq))) {
const char *prefix;
gboolean is_retransmission = FALSE;
if (msp->first_frame == pinfo->num) {
/* This must be after the first pass. */
@ -1259,8 +1260,19 @@ again:
}
} else {
prefix = "Retransmitted ";
is_retransmission = TRUE;
}
if (!is_retransmission) {
ipfd_head = fragment_get(&ssl_reassembly_table, pinfo, msp->first_frame, msp);
if (ipfd_head != NULL && ipfd_head->reassembled_in !=0 &&
ipfd_head->reassembled_in != pinfo->num) {
/* Show what frame this was reassembled in if not this one. */
item=proto_tree_add_uint(tree, *ssl_segment_items.hf_reassembled_in,
tvb, 0, 0, ipfd_head->reassembled_in);
proto_item_set_generated(item);
}
}
nbytes = tvb_reported_length_remaining(tvb, offset);
ssl_proto_tree_add_segment_data(tree, tvb, offset, nbytes, prefix);
return;
@ -1567,9 +1579,10 @@ again:
if (!called_dissector || pinfo->desegment_len != 0) {
if (ipfd_head != NULL && ipfd_head->reassembled_in != 0 &&
ipfd_head->reassembled_in != pinfo->num &&
!(ipfd_head->flags & FD_PARTIAL_REASSEMBLY)) {
/*
* We know what frame this PDU is reassembled in;
* We know what other frame this PDU is reassembled in;
* let the user know.
*/
item=proto_tree_add_uint(tree, *ssl_segment_items.hf_reassembled_in,