Hi,
When heavily opening and closing the tcp receive window on one side of a
TCP connection, I ran into the problem with the TCP sstresh value being
set to 0 resulting in a stop of transmission. My interpretion of the
TCP standards (carefully studying of TCP/IP Illustrated) is that sstresh
never should be assigned a value less than one MSS. Adding zero value
check to the code solved all the transmissions stops.
My proposed patch against 1.2.0 is:
--- lwip-1.2.0/src/core/tcp_in.c 2006-08-18 12:18:42.000000000
+0200
+++ lwip-1.2.0_patched/src/core/tcp_in.c 2007-06-08
10:24:42.451875000 +0200
@@ -678,6 +678,9 @@
pcb->ssthresh = pcb->snd_wnd / 2;
else
pcb->ssthresh = pcb->cwnd / 2;
+
+ if (pcb->sstresh == 0)
+ pcb->sstresh = pcb->mss;
pcb->cwnd = pcb->ssthresh + 3 * pcb->mss;
pcb->flags |= TF_INFR;
Regards,
PH
--
Per-Henrik Lundblom epost: [EMAIL PROTECTED]
telefon: 0733-20 71 26 hemsida: www.whatever.nu
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users