Hello, I'd like to suggest adding a new feature (enabled by sysctl, disabled by default) - turn on SO_KEEPALIVE on all TCP connections unless disabled by the application (the opposite of what is done now). I know it's against the RFC (MUST default to off), but I can see some situations where that would be useful: - I'm connecting from behind an IP masquerading firewall (having just one IP address assigned), and keepalives reset the masquerade timer before it expires (and breaks the connection). - I know of at least one router/firewall [1] which seems to track the state of TCP connections somehow, and freezes connections that are idle for too long (about 1-2 hours - it just drops packets from these connections, causing a timeout as soon as there is some data to send). "echo 1800 > /proc/sys/net/ipv4/tcp_keepalive_time" (on only one end) solves both of these problems, but only for applications that turn on SO_KEEPALIVE (OpenSSH does). In such situations, it would be nice to be able to do something like "echo 1 > /proc/sys/net/ipv4/tcp_keepalive_default" to turn on SO_KEEPALIVE for all applications without modifying them. Would a patch implementing something like this be accepted? Thanks, Marek [1] no details what software is running on it, it's not under my control, all I heard is that it was very expensive ;). It seems to have trouble with ECN as well (100% reproducible, doesn't happen from a few other places; the machine I've tested this from is running 2.4.3 with no ECN): $ telnet ftp.kernel.org 21 Trying 209.10.41.242... Connected to zeus.kernel.org. Escape character is '^]'. 220 ProFTPD 1.2.2rc2 Server (ProFTPD) [zeus.kernel.org] user anonymous 331 Anonymous login ok, send your complete email address as your password. pass marekm@xxxxxxxxxx.pl 230- Welcome to the Connection closed by foreign host. - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org