[Top][All Lists]

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

[lwip-devel] [bug #20126] Zero ssthresh bug

From: Per-Henrik Lundblom
Subject: [lwip-devel] [bug #20126] Zero ssthresh bug
Date: Fri, 08 Jun 2007 10:35:18 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070515 Firefox/


                 Summary: Zero ssthresh bug
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: vajper
            Submitted on: Friday 06/08/2007 at 10:35
                Category: TCP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any



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
+++ 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;
               pcb->ssthresh = pcb->cwnd / 2;
+            if (pcb->sstresh == 0)
+              pcb->sstresh = pcb->mss;

             pcb->cwnd = pcb->ssthresh + 3 * pcb->mss;
             pcb->flags |= TF_INFR;

I have only seen the sstresh being set to 0, but probably it is better to

            if (pcb->sstresh < pcb->mss)
              pcb->sstresh = pcb->mss;


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]