Subject: Re: Fw: Re: tcp connections lost on interface down
To: Michael van Elst <mlelstv@serpens.de>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-net
Date: 08/21/2003 21:57:56
On Tue, Aug 19, 2003 at 11:06:21PM +0000, Michael van Elst wrote:
> bouyer@antioche.eu.org (Manuel Bouyer) writes:
> 
> >So yes, when an address change or an interface goes away we can't
> >terminate existing connections, because it may eventually come back in
> >some time.
> 
> The same could be said for the writing case, but as you said:
> "[the application] expects the stack to deliver it to the remote end
> within a specified amount of time, or get an error once this amount
> of time has expired". There the TCP stack does terminate an existing
> connection even when [the interface] might eventually come back in
> some time.

The connection is terminated after a timeout (if the socket has some data
pending), and I think the timeout is even defined in some RFC.

> 
> The fact that you currently can get away with changing an interface
> (for the simple case that the connections are all idle) is completely
> arbitrary. It's just 'luck' that the TCP protocol can't tell a reader
> that the peer is unreachable.

No, it's not. It's because of the TCP timeout.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 24 ans d'experience feront toujours la difference
--