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

Submitted by:  Albert Huitsing <ajhuitsing>
Submitted on:  Thu 11 Sep 2014 09:22:11 AM UTC  
 
Category: TCPSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: git head

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

Fixed, thanks for reporting.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 16 Sep 2014 06:19:09 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed
    Tue 16 Sep 2014 06:17:09 PM UTCgoldsimonSummarytcp_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.1-cleanup1