tcp: Properly count duplicated ACKs
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 11 May 2012 02:00:18 +0000 (10:00 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 11 May 2012 09:30:03 +0000 (17:30 +0800)
sys/netinet/tcp_input.c

index 1ee3499..672b7f9 100644 (file)
@@ -1907,7 +1907,8 @@ after_listen:
                                tcp_sack_update_scoreboard(tp, &to);
                        if (!tcp_callout_active(tp, tp->tt_rexmt) ||
                            th->th_ack != tp->snd_una) {
-                               tcpstat.tcps_rcvdupack++;
+                               if (tlen == 0 && tiwin == tp->snd_wnd)
+                                       tcpstat.tcps_rcvdupack++;
                                tp->t_dupacks = 0;
                                break;
                        }