summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndersBroman <anders.broman@ericsson.com>2014-12-15 15:00:04 +0100
committerAnders Broman <a.broman58@gmail.com>2014-12-17 15:04:49 +0000
commita13bbfcecbf20a56c75d1f2a9d6fa69a2e9ad758 (patch)
tree714e8a1f069e14952bbb36cc232e6513b0d8273c
parent6b7a395f9b22ac8e7cca1faf204e7e350508b6a3 (diff)
downloadwireshark-a13bbfcecbf20a56c75d1f2a9d6fa69a2e9ad758.tar.gz
[TCP] Don't attempt reassembly on retransmitted segments.
Change-Id: I140227416435589a8b83ccb440625ccb90d0673e Reviewed-on: https://code.wireshark.org/review/5772 Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--epan/dissectors/packet-tcp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index 347bdb9698..00840617fe 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -972,6 +972,7 @@ pdu_store_sequencenumber_of_next_pdu(packet_info *pinfo, guint32 seq, guint32 nx
msp->last_frame_time=pinfo->fd->abs_ts;
msp->flags=0;
wmem_tree_insert32(multisegment_pdus, seq, (void *)msp);
+ /*g_warning("pdu_store_sequencenumber_of_next_pdu: seq %u", seq);*/
return msp;
}
@@ -1915,6 +1916,18 @@ again:
return;
}
+ /* The above code only finds retransmission if the PDU boundaries and the seq coinside I think
+ * If we have sequience analysis active use the TCP_A_RETRANSMISSION flag.
+ * XXXX Could the above code be improved?
+ */
+ if((tcpd->ta) && ((tcpd->ta->flags&TCP_A_RETRANSMISSION) == TCP_A_RETRANSMISSION)){
+ const char* str = "Retransmitted ";
+ nbytes = tvb_reported_length_remaining(tvb, offset);
+ proto_tree_add_bytes_format(tcp_tree, hf_tcp_segment_data, tvb, offset,
+ nbytes, NULL, "%sTCP segment data (%u byte%s)", str, nbytes,
+ plurality(nbytes, "", "s"));
+ return;
+ }
/* Else, find the most previous PDU starting before this sequence number */
msp = (struct tcp_multisegment_pdu *)wmem_tree_lookup32_le(tcpd->fwd->multisegment_pdus, seq-1);
}