This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: Socket leak when accept() is aborted by TCP RST?


You could try "TCP/IP Illustrated, Volume 2" (and volume 1) by Gary R. Wright and W. Richard Stevens, published by Addison Wesley. It's a bit dated, but the basics are there. It shows the network code listings, bit by bit, with an explanation for each line.

Jay

On 7/27/2010 3:39 PM, Grant Edwards wrote:
On 2010-07-27, Jay Foster<jay@systech.com> wrote:

   I don't know about the socket leak, per se, but I have had some
dealings with the original BSD network stack with regards to the
accept() call.  From my memory, I remember there being two queues on
which the socket might be placed (so_comp, so_incomp).  Depending on the
timing, the socket might be on the incomplete or the completed queue
when the RST arrives.  Perhaps there is a bug in one of these code paths
when receiving a RST (probably the so_incomp queue).
Thanks for the clue.  I've been looking at BSD code for a little
while, and I'm afraid I'm completely lost.  Can anybody point me to
any docs on how the stack works? (e.g. what the normal flow is and
where the new socket gets allocated.)


-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]