buglwIP - A Lightweight TCP/IP stack - Bugs: bug #43192, tcp_enqueue_flags() should not...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #43192: tcp_enqueue_flags() should not check TCP_SND_QUEUELEN when sending FIN

Submitter:  Albert Huitsing <ajhuitsing>
Submitted:  Thu 11 Sep 2014 09:22:11 AM UTC
   
 
Category:  TCP Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  git head

Tue 16 Sep 2014 06:19:09 PM UTC, comment #1: 

Fixed, thanks for reporting.

Simon Goldschmidt <goldsimon>
Group administrator
Thu 11 Sep 2014 09:22:11 AM UTC, original submission:  

in tcp_out.c() : tcp_enqueue_flags()

if ((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) {
    LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 3, ("tcp_enqueue_flags: too long queue %"U16_F" (max %"U16_F")\n",
                                       pcb->snd_queuelen, TCP_SND_QUEUELEN));

will cause hangup in some cases, which can be partially fixed by:

if ((pcb->snd_queuelen > TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) {
    LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 3, ("tcp_enqueue_flags: too long queue %"U16_F" (max %"U16_F")\n",
                                       pcb->snd_queuelen, TCP_SND_QUEUELEN));



but this seems not the entire solution:


quote from Simon on this bug by email:

"This seems like a bug in lwIP, but your fix is not really correct. It might solve your specific problem, but only because of your current pcb->snd_queuelen state. A more general fix might have to detect that only a FIN should be enqueued and ignore the TCP_SND_QUEUELEN counter in this case."


but I'm not deep enough into LWIP for that...

Albert Huitsing <ajhuitsing>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Updated the item)
  • -email is unavailable- added by ajhuitsing (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-09-16 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2014-09-16 goldsimon Summarytcp_enqueue_flags() should TCP_SND_QUEUELEN when sending FIN tcp_enqueue_flags() should not check TCP_SND_QUEUELEN when sending FIN

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code