Re: Writing past the end of the TCP window in 2.0.30

Eric.Schenk@dna.lth.se
Tue, 06 May 1997 15:24:07 +0200


Thomas Koenig <ig25@mvmap66.ciw.uni-karlsruhe.de> writes:
>Here's a fairly long tcpdump of Linux 2.0.30 writing past the end of
>the window again. All the time, the backlog queue was large.

Anyone who has seen this problem, please try the following patch and
as usual report back to me. I think this will fix the problem.

--- linux/net/ipv4/tcp_output.c.orig Tue May 6 15:16:55 1997
+++ linux/net/ipv4/tcp_output.c Tue May 6 15:20:01 1997
@@ -1212,6 +1212,9 @@
win_size = skb->len - (((unsigned char *) th) - skb->data);
win_size -= th->doff * 4;

+ /* Don't send more than the offered window! */
+ win_size = min(win_size, sk->window_seq - sk->sent_seq);
+
/*
* Grab the data for a temporary frame
*/

-- 
Eric Schenk                               www: http://www.dna.lth.se/~erics
Dept. of Comp. Sci., Lund University          email: Eric.Schenk@dna.lth.se
Box 118, S-221 00 LUND, Sweden   fax: +46-46 13 10 21  ph: +46-46 222 96 38