lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #44766] TCP session stop transferring when LWIP_WND_SC


From: Homyak
Subject: [lwip-devel] [bug #44766] TCP session stop transferring when LWIP_WND_SCALE is enabled
Date: Tue, 07 Apr 2015 23:00:19 +0000
User-agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36

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

                 Summary: TCP session stop transferring when LWIP_WND_SCALE 
is enabled
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: onlyslon
            Submitted on: Tue 07 Apr 2015 11:00:17 PM GMT
                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: git head

    _______________________________________________________

Details:

Then LWIP_WND_SCALE is enabled tcp session sometimes stops transferring a
data. I do investigation and possibly I found a bug in in Window Update
procedure.
tcp_in.c:969

    if (TCP_SEQ_LT(pcb->snd_wl1, seqno) ||
       (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
       (pcb->snd_wl2 == ackno && tcphdr->wnd > pcb->snd_wnd)) {
      pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd); 


I think the third condition is incorrect cause they not consider window
scaling multipler. Correct code should look like this

    if (TCP_SEQ_LT(pcb->snd_wl1, seqno) ||
       (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
       (pcb->snd_wl2 == ackno && SND_WND_SCALE(pcb, tcphdr->wnd) >
pcb->snd_wnd)) {
      pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd); 






    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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