Subject: Re: Fw: Re: tcp connections lost on interface down
To: Robert Elz <kre@munnari.OZ.AU>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-net
Date: 08/17/2003 12:48:55
On Sun, Aug 17, 2003 at 02:20:22PM +0700, Robert Elz wrote:
> It means nothing, but it is harmless, as nothing for that will ever get
> delivered to you again (even if a packet manages to arrive at your
> NIC, it will be rejected as not belonging to a local address).
> 
> But in practice this is extremely useful, as very frequently, the address
> that has just been deleted comes back again very soon after (on the same
> interface, or perhaps on a different one).   Like perhaps a few microseconds
> later if what is happening is a fairly dumb "delete then install" cycle for
> the address, where whatever is doing it either failed to notice (or was
> unable to notice) that the change is a no-op.
> 
> A more practical case where this can matter, is with removable NICs (like
> PCMCIA cards) - if you remove one, the interface (and its address) vanishes.
> Plug it back in a minute later, get the same address back from DHCP, and
> the world should just resume - there's no need to break every connection
> on the planet.

One thing users here usually do is to remove their 10/100 pcmcia NIC and 
plug in a wireless in place. dhcp here is configured so that a laptop has
the same fixed IP for its ethernet and wireless adapters.
I didn't try with NetBSD, but under windows TCP connections stay up
(I suspect there may be a problem in NetBSD with the name or ifp of the
NIC being cached somewhere).

> Itojun's change was the right thing to do.

Seconded.

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