From e126661b29bb8f40484032c335e43339cf2a8ff0 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Wed, 11 Apr 2012 11:09:33 +0800 Subject: [PATCH] tcp_input: Use acceptable_window_update when applicable While I'm here, adjust comment (ACK is always on when we reach that code) --- sys/netinet/tcp_input.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index a153484fad..86b32651ee 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -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) -- 2.41.0