I'm seeing what appears to me to be a socket leak in the accept()
operation provided by the "new" BSD network stack.
One of my customers is doing something goofy (but legal) on his end
which occasionally opens a socket (SYN,SYN/ACK,ACK) and then 140-150
us later sends a TCP RST. This results in accept() on my end returning
-1 with errno set to 353 (ECONNABORTED). Each time this happens it
appears that a socket gets leaked. After about 240 such aborts, the
stack runs out of sockets (I've configured eCos for 256 sockets, and
there are 16 other sockets that are always in-use).
If the TCP connection stays open for even a few milliseconds (long
enoug for accept() to return>= 0), then I never have any problems.
Has anybody seen this issue before?