From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Horman Subject: Re: BSD 4.2 style TCP keepalives Date: Fri, 8 Jan 2010 07:40:33 -0500 Message-ID: <20100108124033.GA28782@hmsreliant.think-freely.org> References: <20100105.163911.10233438.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, ilpo.jarvinen@helsinki.fi To: David Miller Return-path: Received: from charlotte.tuxdriver.com ([70.61.120.58]:45513 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753254Ab0AHMkl (ORCPT ); Fri, 8 Jan 2010 07:40:41 -0500 Content-Disposition: inline In-Reply-To: <20100105.163911.10233438.davem@davemloft.net> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Jan 05, 2010 at 04:39:11PM -0800, David Miller wrote: > > To make a long story short, there are still some Windows 2000 > machines out there emitting BSD 4.2 style keepalives (one garbage > byte instead of an empty out-of-window probe frame). > > We don't ACK these because of how tcp_sequence() sees ->end_seq > as being equal to ->rcv_wup > > But we can't change tcp_sequence() to reject these frames, because if > we do then we end up mishandling connection attempts (SYN, SYN+ACK) > and retransmits of such. > > Neil has shown me a patch that does a by-hand special case of this > one-garbage-byte keepalive inside of tcp_rcv_established(). > > Anyone have suggestions for an alternative and perhaps cleaner > implementation of a fix? > > Thanks! > Dave, sorry about this, but it looks like we can scrap this, I just looked at the initial tcpdump this was reported in, and apparently w2k doesn't compute the checksum properly on these old style keepalives. Wireshark disables tcp keepalive validation by default, so it wasn't clear to see, but as soon as you enable it, the checksum is marked as bad in all of those frames. So we've got nothing to do here, except maybe make a note of this in case we hit it again in the future. Thanks! Neil