Re: Closing on CONNECTION_CLOSE

Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com> Fri, 28 July 2017 20:32 UTC

Return-Path: <mikkelfj@gmail.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8C0EA129562 for <quic@ietfa.amsl.com>; Fri, 28 Jul 2017 13:32:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mFa_lLC0Ux8E for <quic@ietfa.amsl.com>; Fri, 28 Jul 2017 13:31:58 -0700 (PDT)
Received: from mail-ua0-x233.google.com (mail-ua0-x233.google.com [IPv6:2607:f8b0:400c:c08::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4AF81126CD6 for <quic@ietf.org>; Fri, 28 Jul 2017 13:31:58 -0700 (PDT)
Received: by mail-ua0-x233.google.com with SMTP id 80so171410200uas.0 for <quic@ietf.org>; Fri, 28 Jul 2017 13:31:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc; bh=Xjs9+UOWu6i+GC4MrYr+t/ZQRQaw7gIpNKZxJoanRy0=; b=Dv/dpBdLxw6+kH57HLCcxodZpkpK9q3OEK3PqFe+LKXrBHdBeufzN+3WGHmcwONo1F Mc01hUZoF2o1B8h0sofDA10zeKGDISWnplp/RsRp6woxZUdwfJLZqFE1FpPsE0Eteft0 QFK0rjpJTxKL+VevEHs/DURzX7EzzijeAy1zhuHxE0dZbQkjNgbYOAp52M31MumCbj8t A1qTgojsWFqIvcErBfbvUYxKicIghKNLINAIj8ZXJ08XVdkyEsnfVt+Hw25+visap2MP e8owm3wDKU3AbbjSxwXDR/CyuqWpAmmTQXfp9HqGuVXrUd9eOiGiaLXiIwjb9MrOTTY8 WGbQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=Xjs9+UOWu6i+GC4MrYr+t/ZQRQaw7gIpNKZxJoanRy0=; b=KH4+t1hQY8t5YjMVau651JnO39b/zaES/M9fvUOrI/VrwI3IevdVX2+A+XJPtzENTL 7+K4QNNcARuQl2yu2hmyoVd5TTJrltHJ/8VDQP0n/cD27vO2fPZLJm8lMmEP3f15akzB cP0LRO0zKRIzdbQjf/Yg/tRUD/fsrk8q/obLZ9XE50uEvgIK0PpyxjU5NDg5CfavNHVH najk36rniMFputxil8iv0tVKQU3Slz1dImqvQgzRw8q/ezq7DmhvKBSwki10PWgZqi+p yI5kT/kTUlc4XiPBNoW2rBL5n3zMLcCldpj50X09iM3WsorrIwewwCKZVkSPwOIVL3i4 DpIg==
X-Gm-Message-State: AIVw1134k7zaBylKAQsVoa6qFYrE6XzeoN4WyV2aZDmfmhOx5ecaQo/L D8L23I9Q6VjyJBLGKrcq1uteukRqzw==
X-Received: by 10.31.53.3 with SMTP id c3mr4996230vka.78.1501273917463; Fri, 28 Jul 2017 13:31:57 -0700 (PDT)
Received: from 1058052472880 named unknown by gmailapi.google.com with HTTPREST; Fri, 28 Jul 2017 16:31:56 -0400
From: Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>
In-Reply-To: <e1cac200-cc18-d4b9-e600-81dead5e9eaa@huitema.net>
References: <CABcZeBP_Xh1QC9Qxhy5HYiMiTfknPs7Yp7+X_KnQE1O-juxJ5g@mail.gmail.com> <cb7caadd-73bd-6505-7a57-4b0271fb66d2@huitema.net> <DB5PR07MB1237960D04442972441D9B8B84BE0@DB5PR07MB1237.eurprd07.prod.outlook.com> <CAKcm_gOSSWOiY7S3KCW4674KO76PxoFmcTbFSsbO-71aQmCXHg@mail.gmail.com> <CABcZeBP3s=XrOXjzN=SvjrYkc-eSUAx8BZXTO-BFAQW-55TXzw@mail.gmail.com> <CAGD1bZYEOxSXaw3cMBZTjkdwCVyJ+cca6fhY0Rh1OaGiB0ihSA@mail.gmail.com> <20170728124951.GB2686@ubuntu-dmitri> <CAOdDvNo0v2ckD1fy9C2iofcMBtVtCBi5QzeVY9w=0D-G-TcRbw@mail.gmail.com> <e1cac200-cc18-d4b9-e600-81dead5e9eaa@huitema.net>
X-Mailer: Airmail (420)
MIME-Version: 1.0
Date: Fri, 28 Jul 2017 16:31:56 -0400
Message-ID: <CAN1APdfEaNfHC+BsKu1MoTPRbgEHceXYbbBpqw=bAeE65EV01w@mail.gmail.com>
Subject: Re: Closing on CONNECTION_CLOSE
To: Dmitri Tikhonov <dtikhonov@litespeedtech.com>, Christian Huitema <huitema@huitema.net>, Patrick McManus <pmcmanus@mozilla.com>
Cc: Eric Rescorla <ekr@rtfm.com>, Jana Iyengar <jri@google.com>, IETF QUIC WG <quic@ietf.org>, Ian Swett <ianswett@google.com>, "Swindells, Thomas (Nokia - GB/Cambridge, UK)" <thomas.swindells@nokia.com>
Content-Type: multipart/alternative; boundary="001a11447e9a8fa45a055566926a"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/t6fHx4eszYnMm7n1sBmzTSL-Jsg>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Jul 2017 20:32:01 -0000

As Subodh pointed out, "TIME_WAIT exists in TCP is to protect us from the
local port being re-bound to another connection and the data from the old
connection interfering with the new connection."

That would be another argument for making the connection independent of
5-tuple. It would also simplify error handling during early handshake and
decouple protocol for from lower layer.

Kind Regards,
Mikkel Fahnøe Jørgensen


On 28 July 2017 at 20.49.25, Christian Huitema (huitema@huitema.net) wrote:



On 7/28/2017 10:15 AM, Patrick McManus wrote:

I disagree a little bit with (I think) Subodh and Wily regarding what to
send when you recv data after you have sent a CLOSE. I want to strongly
encourage implementations to have a TIME_WAIT like period of being able to
a fully protected CLOSE (it can be a memcpy retransmit). public reset ought
to be left as a last resort.


As Subodh pointed out, "TIME_WAIT exists in TCP is to protect us from the
local port being re-bound to another connection and the data from the old
connection interfering with the new connection." We don't have that
constraint of old packets resurfacing 30 seconds later and interfering with
a new data flow. Encryption protects against that. The "waiting" or
"draining" period would mostly be a courtesy to the peer, to ensure that
the CLOSE frame is well received, and that the peer actually stops sending.

The normal duration of the draining period would be "sufficiently more than
1 RTT". With the current spec, the closer knows that the CLOSE has not been
received yet if it keeps receiving packets from the peer. This should
normally last for 1 RTT after sending the CLOSE frame. If it receives any
packets more than 1 RTT after sending the CLOSE, it can assume that the
CLOSE frame was not received. It would make sense to resend it then.

Of course, there is a question of how long to wait after 1 RTT. Probably
"some time depending on the application".

We could be tempted to specify acknowledgements, etc. But then we have to
remember the two generals...

--
Christian Huitema