netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: TCP: orphans broken by RFC 2525 #2.17
Date: Mon, 27 Sep 2010 07:39:01 +0200	[thread overview]
Message-ID: <20100927053901.GL12373@1wt.eu> (raw)
In-Reply-To: <20100926.181202.28824153.davem@davemloft.net>

On Sun, Sep 26, 2010 at 06:12:02PM -0700, David Miller wrote:
> From: Willy Tarreau <w@1wt.eu>
> Date: Mon, 27 Sep 2010 01:25:30 +0200
> 
> > Agreed. But that's not a reason for killing outgoing data that is
> > being sent when there are some data left in the rcv buffer.
> 
> What alternative notification to the peer do you suggest other than a
> reset, then?  TCP gives us no other.

I know, and I agree to send the reset, but after the data are correctly
transferred. This reset's purpose is only to inform the other side that
the data it sent were destroyed. It is not a requirement to tell it they
were destroyed earlier or later. What matters is that it's informed they
were destroyed.

That's why I think that it is perfectly reasonable to either destroy them
after the ACK or simply notify about their destruction after the ACK.

Instead of having :

        A                                               B

       --->     <SEQ=100><ACK=300>                     --->
       <---     <SEQ=300><ACK=100><DATA=10>            <---
       --->     <SEQ=100><ACK=310>                     --->
       send(100)
       shutdown()
       close()
       --->     <SEQ=100><CTL=RST>                     --->

We would just have :

        A                                               B

       --->     <SEQ=100><ACK=300>                     --->
       <---     <SEQ=300><ACK=100><DATA=10>            <---
       --->     <SEQ=100><ACK=310>                     --->
       send(100)
       shutdown()
       close()
       --->     <SEQ=100><ACK=310><DATA=100><CTL=FIN>  --->
       <---     <SEQ=300><ACK=111>                     <---
       --->     <SEQ=111><CTL=RST>                     --->

Note that the notification is exactly the same as if we wanted
to notify B about the destruction of data that were sent just
after the close, because the RST only carries a SEQ field and
no ACK indicating what it destroyed :

        A                                               B

       --->     <SEQ=100><ACK=300>                     --->
       send(100)
       shutdown()
       --->     <SEQ=100><ACK=310><DATA=100><CTL=FIN>  --->
       <---     <SEQ=300><ACK=111><DATA=10>            <---
       close()
       --->     <SEQ=111><CTL=RST>                     --->

In my opinion, last two examples are perfectly valid, they just mean
"after that, I close and don't want to hear about you again".

> That's the thing, data integrity is full duplex, thus once it has been
> compromised in one direction everything currently in flight must be
> zapped.

I'm well aware of that, and even though that's an annoying method, we
must live with it, it's probably one of the things that contribute TCP
its well known reliability. But I think that RFC 2525 abused the TCP
use based on traces showing a bad behaviour and overlooked all impacts
(nothing there talks about the case of data being sent or in flight at
the moment of the close).

Regards,
Willy


  reply	other threads:[~2010-09-27  5:39 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-26 13:17 TCP: orphans broken by RFC 2525 #2.17 Willy Tarreau
2010-09-26 17:02 ` Eric Dumazet
2010-09-26 17:40   ` Willy Tarreau
2010-09-26 18:35     ` Eric Dumazet
2010-09-26 18:49       ` Willy Tarreau
2010-09-26 21:01         ` Eric Dumazet
2010-09-26 21:46           ` Willy Tarreau
2010-09-26 22:19             ` David Miller
2010-09-26 22:10         ` David Miller
2010-09-26 19:16     ` Willy Tarreau
2010-09-26 22:14       ` David Miller
2010-09-26 22:13 ` David Miller
2010-09-26 22:34   ` Willy Tarreau
2010-09-26 22:38     ` David Miller
2010-09-26 22:54       ` Willy Tarreau
2010-09-26 23:08         ` David Miller
2010-09-26 23:25           ` Willy Tarreau
2010-09-27  1:12             ` David Miller
2010-09-27  5:39               ` Willy Tarreau [this message]
2010-09-27  5:48                 ` Eric Dumazet
2010-09-27  6:04                   ` Willy Tarreau
2010-09-27  6:44                   ` David Miller
2010-09-27  6:42                 ` David Miller
2010-09-27  7:34                   ` Willy Tarreau
2010-09-27  7:42                     ` David Miller
2010-09-27 19:21                       ` Willy Tarreau
2010-09-27 23:28                         ` Herbert Xu
2010-09-28  5:12                           ` Willy Tarreau
2010-09-28  5:32                             ` David Miller
2010-09-28  5:37                               ` Willy Tarreau
2010-09-27  9:12                     ` Julian Anastasov
2010-09-27 19:24                       ` Willy Tarreau
2010-09-27 20:00                         ` Eric Dumazet
2010-09-28  9:01                         ` Julian Anastasov
2010-09-28  9:26                           ` Willy Tarreau
2010-09-27  8:02 ` Herbert Xu
2010-09-27 20:00   ` Willy Tarreau
2010-09-27 20:08     ` Rick Jones
2010-09-27 20:20       ` Willy Tarreau

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=20100927053901.GL12373@1wt.eu \
    --to=w@1wt.eu \
    --cc=davem@davemloft.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).