On Thu, Aug 30, 2001 at 07:28:27PM -0700, Bob Galloway wrote:
| On Fri, Aug 31, 2001 at 03:25:27AM +0200, Martin F Krafft wrote:
| > tcp  0  0 192.168.14.6:32884  mailhost:smtp   TIME_WAIT   -                 
  
| > tcp  0  0 192.168.14.6:32885  mailhost:smtp   TIME_WAIT   -                 
  
| > tell me nothing about the process owning them.
| > i am merely wondering why this is possible...
| 
| The clue is in the "TIME_WAIT" flag.  The socket is in the late stage

A little more detail : 

The TCP initiator sends a FIN packet to indicate that it is done and
wants to terminate the connection.  The other side sends back an ACK
to acknowledge recieving the FIN.  Then the other side sends a FIN
(when it is ready) to indicate that it too is done and wants to close
the connection.  Then the sockets enter a wait period where they wait
for any remaining packets that are stuck in some routers somewhere to
arrive before they actually close.  If they didn't wait then it is
possible that some other process would get the same port and receive
those left-over packets, which it shouldn't.

-D

Reply via email to