tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

BSD doesn't track window size changes correctly.

I've been having some problems with FreeBSD not following
the remote end updating its window size to 0 and one of the
problematic code paths is common with NetBSD.

In tcp_input.c (NetBSD), we find this:

        * Update window information.
        * Don't look at window if no ACK: TAC's send garbage on first SYN.
       if ((tiflags & TH_ACK) && (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))))) {

... the problem here is that it only recognises window updates
that increase the window size. Thus if the remote end sends back
a packet that indicates the window size is 0, it is ignored.

Has anyone else noticed bad behaviour when the TCP window size is 0?


Home | Main Index | Thread Index | Old Index