lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #25821] lwip_recvfrom failed to reset sock->rcvevent,


From: xun chen
Subject: [lwip-devel] [bug #25821] lwip_recvfrom failed to reset sock->rcvevent, communication lost sync totally
Date: Wed, 11 Mar 2009 13:15:50 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 (.NET CLR 3.5.30729)

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

                 Summary: lwip_recvfrom failed to reset sock->rcvevent,
communication lost sync totally
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: xchen
            Submitted on: Wed 11 Mar 2009 01:15:48 PM GMT
                Category: TCP
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: 1.3.0

    _______________________________________________________

Details:

In TCP connection, if many small packets are sent to lwIP, lwip_recvfrom will
fail to reset sock->rcvevent to zero after retrieving all the data:

Each incoming TCP packet should raise one rcvevent, and lwip_recvfrom picks
up the packet and subtract rcvevent.

If many short packets are sent to lwIP, such as the capture file
(extra_recvevent.cap), packets #27--48 are small packets from PC

rcvevent will go up to 16 in my test.

lwip_recvfrom continue to pick up one packet and subtract event count by one
for a few times

Then, lwip_recvfrom picks up *ALL* the remaining packets and sends them back
to the main, but it failed to bring sock->rcvevent back to zero

As the result, the next call to lwip_recvfrom will see a non-zero
sock->rcvevent but no data to pick up! 

lwIP totally lost sync at this point.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 11 Mar 2009 01:15:48 PM GMT  Name: extra_recvevent.cap  Size: 5kB  
By: xchen

<http://savannah.nongnu.org/bugs/download.php?file_id=17645>

    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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