From: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Mikael Abrahamsson <swmike@swm.pp.se>,
Chris Friesen <chris.friesen@genband.com>,
netdev <netdev@vger.kernel.org>,
David Miller <davem@davemloft.net>,
James Morris <jmorris@namei.org>,
Patrick McHardy <kaber@trash.net>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Subject: Re: Bug? TCP shutdown behaviour when deleting local IP addresses
Date: Thu, 18 Oct 2012 14:01:49 +0400 [thread overview]
Message-ID: <20121018100149.GA5176@ms2.inr.ac.ru> (raw)
In-Reply-To: <1350551609.26103.1261.camel@edumazet-glaptop>
On Thu, Oct 18, 2012 at 11:13:29AM +0200, Eric Dumazet wrote:
> > c) tell the kernel to kill all TCP sessions bound to a certain IP, because
> > the connection manager is going to remove it shortly. Send TCP RSTs or
> > whatever and close the TCP session, so both ends know that network
> > connectivity is going down.
> >
>
> Yes, why not.
FYI the idea was by Andi Kleen back in 2003. If was flag IFF_DYNAMIC
on device (apparently, it should be per-interface sysctl instead
or even a flag on specific address).
Andi suggested to hook netdev notifier and to reset tcp connections
bound to addresses on this interface. He did not go so far to send
resets before address is actually disabled (it was not a goal, normally
address is already dead to the time when it is deleted),
but techically it is the same.
The problem with this was purely technical, the code has to scan through
all the tcp hash table to search for connections to this address (grrr already :-))
and to take socket lock before making any actions. It is doable, but quite chumbersome
and nobody was interested enough to finish the job.
next prev parent reply other threads:[~2012-10-18 10:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-17 23:01 Bug? TCP shutdown behaviour when deleting local IP addresses Chris Friesen
2012-10-17 23:27 ` David Miller
2012-10-18 6:33 ` Chris Friesen
2012-10-18 6:05 ` Eric Dumazet
2012-10-18 7:08 ` Chris Friesen
2012-10-18 7:29 ` Eric Dumazet
2012-10-19 15:12 ` Chris Friesen
2012-10-19 20:43 ` Andi Kleen
2012-10-18 8:05 ` Mikael Abrahamsson
2012-10-18 9:00 ` David Laight
2012-10-18 10:00 ` Mikael Abrahamsson
2012-10-18 9:13 ` Eric Dumazet
2012-10-18 9:58 ` Mikael Abrahamsson
2012-10-18 10:01 ` Alexey Kuznetsov [this message]
2012-10-18 10:10 ` Mikael Abrahamsson
2012-10-18 10:37 ` Benny Amorsen
2012-10-18 13:00 ` Mikael Abrahamsson
2012-10-18 13:09 ` Benny Amorsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121018100149.GA5176@ms2.inr.ac.ru \
--to=kuznet@ms2.inr.ac.ru \
--cc=chris.friesen@genband.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=swmike@swm.pp.se \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox