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.)