Re: Connections in TIME_WAIT after unclean exit on local machine

David Miller (davem@twiddle.net)
Sun, 21 Feb 1999 02:35:33 -0800


From: Stanislav Meduna <stano@trillian.eunet.sk>
Date: Sun, 21 Feb 1999 10:28:54 +0100 (CET)

the following (not quite correct) code leaves a connection in
TIME_WAIT state for one minute after an exit without shutdown. Is
there some reason not to clear the connection immediately, when the
both sides belong to local machine?

Because the protocols say so... of course your suggestion makes sense,
but what is a reliably way to tell if both sides are on the local
machine, how do I know that one of the ends (even though it is
127.0.0.1) does not really proxy to another ip address and port?

The interesting fact is that if I uncomment the write on the accept
side, the connection _is_ cleared. Similar ~rite on the connect
side does not have such effect.

Of course, again the standards and RFC's say to do this.
When the one end writes, and the other end closes before sinking that
read data, TCP is supposed to reset the connect because this indicates
loss of data and potentially corruption (ie. TCP's reliability aspect
has been compromised)

Can people start reading the RFC's before they start passing judgment
on how the kernel networking behaves? I have enough bug backlog to
deal with from people who have done their homework.

Later,
David S. Miller
davem@redhat.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/