Thread (18 messages) 18 messages, 8 authors, 2012-10-19

Re: Bug? TCP shutdown behaviour when deleting local IP addresses

flat view

From: Mikael Abrahamsson <hidden>
Date: 2012-10-18 09:58:03

On Thu, 18 Oct 2012, Eric Dumazet wrote:
quoted
After resume (or otherwise network connectivity re-established),
connection manager should be able to tell the kernel to:

a) kill all TCP/UDP/other sessions existing which doesn't currently have
an active IP address on the machine. This is for the sake of local
clients.
You do realize kernel has no idea that the loss of IP address is
temporary or not ?
Indeed, that's why I wrote "connection manager tell the kernel to..", and didn't write "the kernel should do".
Some links can be slow to setup after a resume.
Absolutely.
quoted
b) the TCP/SCTP sessions that *do* have an IP, should have their
retransmit timers "reset", so that whatever needs to be sent, should be
sent immediately (or shortly, within a few seconds).
So they are going to force a close, even if the link becomes alive after
15 seconds. Too bad for some wireless setups, or tunnels.
I don't get what you're saying. I'm saying reset the retransmit timers, if there is no response, exponential backoff applies again. The reset of the timers is to avoid that the exponential backoff timer is now in "wait for several minutes to send the next packet" due to no connectivity during the first 10-20 seconds after coming out of resume.

On my Ubuntu 12.04 system, when I bring it out of resume and press enter in the terminal with an established ssh session, it takes minutes to discover that this session doesn't work and close it (it seems the TCP RST from the server isn't triggered for a long time). I usually end up killing the ssh process on the laptop and logging in again. What I want to happen is that within a few seconds of network connectivity being established, TCP should try to communicate and discover that the other end already closed the connection and close the local socket call so ssh quits and I can re-login again. One way of doing this would be for the connection manager to ask the kernel to reset (or severely lower) the retransmit timers on all established TCP connections.

-- 
Mikael Abrahamsson    email: swmike@swm.pp.se
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help