tcp_input: Use acceptable_window_update when applicable
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 11 Apr 2012 03:09:33 +0000 (11:09 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 11 Apr 2012 03:28:18 +0000 (11:28 +0800)
While I'm here, adjust comment (ACK is always on when we reach that code)

sys/netinet/tcp_input.c

index a153484..86b3265 100644 (file)
@@ -2135,13 +2135,8 @@ process_ACK:
 
                /*
                 * Update window information.
-                * Don't look at window if no ACK:
-                * TAC's send garbage on first SYN.
                 */
-               if (SEQ_LT(tp->snd_wl1, th->th_seq) ||
-                   (tp->snd_wl1 == th->th_seq &&
-                    (SEQ_LT(tp->snd_wl2, th->th_ack) ||
-                     (tp->snd_wl2 == th->th_ack && tiwin > tp->snd_wnd)))) {
+               if (acceptable_window_update(tp, th, tiwin)) {
                        /* keep track of pure window updates */
                        if (tlen == 0 && tp->snd_wl2 == th->th_ack &&
                            tiwin > tp->snd_wnd)