aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tcp.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2015-09-05 18:31:11 -0400
committerBill Meier <wmeier@newsguy.com>2015-09-16 00:42:14 +0000
commitc36ed56abedb3275a9529eb51f8adca807e199c9 (patch)
tree9bf83de1d944163ef49801bd73dcb4766cd828f8 /epan/dissectors/packet-tcp.c
parentbec65ab1ac33ddf7e7694dfe361f4e55ae5c1dc7 (diff)
[tcp] Fix case of incorrect "[TCP ACKed unseen segment]"
The invalid message occurred for an ack of a TCP segment which included both retransmitted data and additional new data. Bug: 11506 Change-Id: Id981d04c91b9e69b6ee1e0dea85aed142bf32594 Reviewed-on: https://code.wireshark.org/review/10395 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'epan/dissectors/packet-tcp.c')
-rw-r--r--epan/dissectors/packet-tcp.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index b80fafc668..98fbcffddc 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -1376,7 +1376,7 @@ finished_fwd:
}
/* Check for spurious retransmission. If the current seq + segment length
- * is less then the receivers lastask, the packet contains duplicated
+ * is less then the receivers lastack, the packet contains duplicated
* data and may be considered spurious.
*/
if ( seq + seglen < tcpd->rev->lastack ) {
@@ -1430,9 +1430,14 @@ finished_checking_retransmission_type:
}
/* Store the highest continuous seq number seen so far for 'max seq to be acked',
- so we can detect TCP_A_ACK_LOST_PACKET condition
+ so we can detect TCP_A_ACK_LOST_PACKET condition.
+ Notes:
+ A retransmitted segment can include additional data not previously seen.
+ XXX: It seems that the additional data may never be dissected (by a sub-dissector)
+ since the whole segment is marked as being a retransmission.
*/
- if(EQ_SEQ(seq, tcpd->fwd->maxseqtobeacked) || !tcpd->fwd->maxseqtobeacked) {
+ if((LE_SEQ(seq, tcpd->fwd->maxseqtobeacked) && GT_SEQ(tcpd->fwd->nextseq, tcpd->fwd->maxseqtobeacked))
+ || !tcpd->fwd->maxseqtobeacked) {
if( !tcpd->ta || !(tcpd->ta->flags&TCP_A_ZERO_WINDOW_PROBE) ) {
tcpd->fwd->maxseqtobeacked=tcpd->fwd->nextseq;
}