[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <524AEDD1.9010709@hp.com>
Date: Tue, 01 Oct 2013 08:44:17 -0700
From: Rick Jones <rick.jones2@...com>
To: Chris Verges <cverges@...tient-energy.com>
CC: Eric Dumazet <eric.dumazet@...il.com>, davem@...emloft.net,
kuznet@....inr.ac.ru, jmorris@...ei.org, yoshfuji@...ux-ipv6.org,
kaber@...sh.net, netdev@...r.kernel.org
Subject: Re: Established sockets remain open after iface down or address lost
On 10/01/2013 06:27 AM, Chris Verges wrote:
> The client establishes a connection to the server. It requests some
> data and gets a response. The socket remains open. The server then
> decides, through some asynchronous process, that the radio needs to be
> duty cycled. So the radio is turned off.
>
> The client attempts to make another request to the device, but
> determines that the connection is dead through the normal retry
> mechanisms. It's write() operation returns something like EPIPE. So on
> the client's side, the connection is dead.
>
> But on the server side, the socket is still open and waiting for some
> more data. The interface and IP address and even the remote client are
> long gone, but the socket still persists and uses system resources.
The protocol between client and server needs to have an
application-layer "keepalive" mechanism added, and then the server will
be able to detect a dangling connection without need of any further
kernel modifications.
If that is not possible, the server can/should set SO_KEEPALIVE and
perhaps tweak the TCP keepalive settings. Not as good (IMO) as an
application-layer keepalive because it only shows that the connection is
good as far as TCP, but I suppose it could do in a pinch.
rick jones
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists