lwip-devel
[Top][All Lists]
Advanced

[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:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

URL:
  <http://savannah.nongnu.org/bugs/?20126>

                 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

    _______________________________________________________

Details:

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;


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

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






    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?20126>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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