lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #46696] accepts_pending not decreased when TCP_EVENT_A


From: Joel Cunningham
Subject: [lwip-devel] [bug #46696] accepts_pending not decreased when TCP_EVENT_ACCEPT returns error
Date: Thu, 24 Mar 2016 15:12:48 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0

Follow-up Comment #18, bug #46696 (project lwip):

I also took a look at the changes and agree the inconsistent state situations
seems to come about because the upper layers are currently required to perform
a matching pair of tcp_backlog_delayed() and tcp_backlog_accepted() calls.  If
the child PCB is freed internally before this happens and is in state
ESTABLISHED, we have a leak in the listener.

The bulk of the problem seems to stem from not knowing if the child PCB (once
in state ESTABLISHED) being freed is actually on the backlog or not.

One way I could think to solve this would be to maintain a linked list of
child PBCs in the listener PCB in-addition to the count.  Inserts into the
list would be O(1) by inserting at head, removals would be more expensive in
we would have to traverse the list.  Operations to check the backlog size
could use the count in order to avoid a traversal

This would then allow TCP internal to free PCBs without the matching
tcp_backlog_accepted() call from the upper layers


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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