lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #25882] TCP hangs on MSS > pcb->snd_wnd


From: Homyak
Subject: [lwip-devel] [bug #25882] TCP hangs on MSS > pcb->snd_wnd
Date: Mon, 16 Mar 2009 09:25:29 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.8.1.4) Gecko/20060911 SUSE/2.0.0.4-1.2 Firefox/2.0.0.4

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

                 Summary: TCP hangs on MSS > pcb->snd_wnd
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: onlyslon
            Submitted on: Пнд 16 Мар 2009 09:25:27
                Category: TCP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: CVS Head

    _______________________________________________________

Details:

Hello.

I found a little bug when try using lwip as HTTP client. TCP session hangs if
server announce small window (like 192 bytes).

The problem arose when the client (lwip) tried to write to socket more data
than remote recv window. 

In tcp_enqueue I found 

  while (queue == NULL || left > 0) {

    /* The segment length should be the MSS if the data to be enqueued
     * is larger than the MSS. */
    seglen = left > pcb->mss? pcb->mss: left;


but then seglen > snd_wnd lwip does not send this segment and this pcb loops
on zero-window-probe packets

Possibly solution for this bug:

seglen = left > pcb->mss? pcb->mss: left;
+ seglen = seglen > pcb->snd_wnd ? pcb->snd_wnd : seglen;

at tcp_enqueue

In my case it works.





    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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