Subject: Re: tcp window update patch
To: Michael Graff <explorer@flame.org>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-net
Date: 02/04/1999 11:58:00
On 03 Feb 1999 21:48:34 -0800
Michael Graff <explorer@flame.org> wrote:
> The comment and the code in tcp_input.c don't quite match, I believe.
> If the comment is right, the code is wrong. This change makes the
> window update only occur when the TH_ACK bit is set in a packet.
> The question is, is it right?
I believe you are correct. MAtt Thomas found this and mentioned it,
at some point, as did cgd (for Matt). I think it got botched when
doing the -Wall changes. Please commit this fix.
>
> Index: sys/netinet/tcp_input.c
> ===================================================================
> RCS file: /cvsroot/src/sys/netinet/tcp_input.c,v
> retrieving revision 1.75
> diff -u -r1.75 tcp_input.c
> --- tcp_input.c 1999/01/24 01:19:28 1.75
> +++ tcp_input.c 1999/02/04 03:44:36
> @@ -1379,9 +1379,9 @@
> * 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, ti->ti_seq)) ||
> + if ((tiflags & TH_ACK) && (SEQ_LT(tp->snd_wl1, ti->ti_seq) ||
> (tp->snd_wl1 == ti->ti_seq && SEQ_LT(tp->snd_wl2, ti->ti_ack)) ||
> - (tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd)) {
> + (tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd))) {
> /* keep track of pure window updates */
> if (ti->ti_len == 0 &&
> tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd)
-- Jason R. Thorpe <thorpej@nas.nasa.gov>