TCP: Don't add [TCP segment of a reassembled PDU] to the second PDU

When desegmenting, don't add [TCP segment of a reassembled PDU] to
the INFO column if we've already dissected a complete PDU in this
frame. This is for the same reasons that we set a fence in the INFO
column and set the PROTOCOL column to be not writable. It's not
of particular interest that this frame also contains the start of
a new PDU when the INFO column has information about a complete
higher level PDU. The information about the other PDU is contained
in the tcp tree elements.

Fix #15494
This commit is contained in:
John Thacker 2022-05-29 11:42:17 -04:00
parent ec12d0c530
commit 6fd1c08a3a
1 changed files with 8 additions and 2 deletions

View File

@ -3714,6 +3714,7 @@ desegment_tcp(tvbuff_t *tvb, packet_info *pinfo, int offset,
proto_item *item;
struct tcp_multisegment_pdu *msp;
gboolean cleared_writable = col_get_writable(pinfo->cinfo, COL_PROTOCOL);
gboolean first_pdu = TRUE;
const gboolean reassemble_ooo = tcp_analyze_seq && tcp_desegment && tcp_reassemble_out_of_order;
tcp_endpoint_t orig_endpoint, new_endpoint;
@ -3844,7 +3845,9 @@ again:
if (msp->first_frame == pinfo->num || msp->first_frame_with_seq == pinfo->num) {
str = "";
col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "[TCP segment of a reassembled PDU]");
if (first_pdu) {
col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "[TCP segment of a reassembled PDU]");
}
} else {
str = "Retransmitted ";
is_retransmission = TRUE;
@ -4432,7 +4435,9 @@ again:
* Just mark this as TCP.
*/
col_set_str(pinfo->cinfo, COL_PROTOCOL, "TCP");
col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "[TCP segment of a reassembled PDU]");
if (first_pdu) {
col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "[TCP segment of a reassembled PDU]");
}
}
/*
@ -4463,6 +4468,7 @@ again:
col_set_fence(pinfo->cinfo, COL_INFO);
cleared_writable |= col_get_writable(pinfo->cinfo, COL_PROTOCOL);
col_set_writable(pinfo->cinfo, COL_PROTOCOL, FALSE);
first_pdu = FALSE;
offset += another_pdu_follows;
seq += another_pdu_follows;
goto again;