Permalink
Browse files

tcp_input: Use acceptable_window_update when applicable

While I'm here, adjust comment (ACK is always on when we reach that code)
  • Loading branch information...
1 parent d58ca57 commit e126661b29bb8f40484032c335e43339cf2a8ff0 Sepherosa Ziehau committed Apr 11, 2012
Showing with 1 addition and 6 deletions.
  1. +1 −6 sys/netinet/tcp_input.c
View
@@ -2135,13 +2135,8 @@ tcp_input(struct mbuf **mp, int *offp, int proto)
/*
* 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)

0 comments on commit e126661

Please sign in to comment.