All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Horman <nhorman@tuxdriver.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, ilpo.jarvinen@helsinki.fi
Subject: Re: BSD 4.2 style TCP keepalives
Date: Tue, 5 Jan 2010 21:07:56 -0500	[thread overview]
Message-ID: <20100106020756.GA4378@localhost.localdomain> (raw)
In-Reply-To: <20100105.163911.10233438.davem@davemloft.net>

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?
> 
Dave, If that patch fixes the problem (waiting on test results now, but I figure
it will), what if we add a parameter to tcp_sequence (and
tcp_validate_incomming), that represents an offset to trim from end_seq (so that
we can effectively ignore the garbage byte)?  Its not much cleaner, but it
consolidates the code a bit, and is probably a bit quicker.  Then we can just
pass a 0 value to tcp_validate_incomming from tcp_rcv_state_process and 1 in
tcp_rcv_established (or a boolean variable if we want to implement a sysctl to
tune weather or not we want to ack these old frames, if such a knob is
relevant).

I'll happily implement this if theres consensus on it

Thoughts?

Thanks!
Neil

  reply	other threads:[~2010-01-06  2:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-06  0:39 BSD 4.2 style TCP keepalives David Miller
2010-01-06  2:07 ` Neil Horman [this message]
2010-01-06  3:59   ` David Miller
2010-01-06 17:21     ` Rick Jones
2010-01-06 20:50       ` Neil Horman
2010-01-06  8:23 ` David Miller
2010-01-06 23:04   ` David Miller
2010-01-07  0:14     ` David Miller
2010-01-07  3:21       ` David Miller
2010-01-07  3:36         ` David Miller
2010-01-07  0:34     ` Ilpo Järvinen
2010-01-07  0:59       ` David Miller
2010-01-07  7:55         ` Ilpo Järvinen
2010-01-08 12:40 ` Neil Horman
2010-01-08 21:21   ` David Miller
2010-01-09  1:22     ` Neil Horman
2010-01-09  1:41       ` David Miller

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=20100106020756.GA4378@localhost.localdomain \
    --to=nhorman@tuxdriver.com \
    --cc=davem@davemloft.net \
    --cc=ilpo.jarvinen@helsinki.fi \
    --cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.