aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2015-07-26 22:29:58 -0400
committerEvan Huus <eapache@gmail.com>2015-07-27 23:11:34 +0000
commit2c798305853524083f49cd4fb03db84533c6d750 (patch)
treeacf467352e6847232476d47f3a57e301ad36f815
parent17320173f878709b8f21d8dc94b66aef8ba37015 (diff)
tcp: only reset dupACK counter when ACk# changes
Otherwise things like window changes will reset the dup-ack counter incorrectly and confusingly. Bug: 11397 Change-Id: I80b63cf989a952547bec48562a92078c8ab29081 Reviewed-on: https://code.wireshark.org/review/9802 Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
-rw-r--r--epan/dissectors/packet-tcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index 3e040f1def..6cba7700a3 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -1282,8 +1282,8 @@ tcp_analyze_sequence_number(packet_info *pinfo, guint32 seq, guint32 ack, guint3
finished_fwd:
- /* If this was NOT a dupack we must reset the dupack counters */
- if( (!tcpd->ta) || !(tcpd->ta->flags&TCP_A_DUPLICATE_ACK) ) {
+ /* If the ack number changed we must reset the dupack counters */
+ if( ack != tcpd->fwd->lastack ) {
tcpd->fwd->lastnondupack=pinfo->fd->num;
tcpd->fwd->dupacknum=0;
}