Re: [quicwg/base-drafts] One close frames (#1900)

MikkelFJ <notifications@github.com> Wed, 24 October 2018 07:47 UTC

Return-Path: <noreply@github.com>
X-Original-To: quic-issues@ietfa.amsl.com
Delivered-To: quic-issues@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 636F1130F00 for <quic-issues@ietfa.amsl.com>; Wed, 24 Oct 2018 00:47:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.47
X-Spam-Level:
X-Spam-Status: No, score=-8.47 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.47, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=github.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 mlPjxXiQN-cW for <quic-issues@ietfa.amsl.com>; Wed, 24 Oct 2018 00:47:45 -0700 (PDT)
Received: from out-1.smtp.github.com (out-1.smtp.github.com [192.30.252.192]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 27F3E130EC5 for <quic-issues@ietf.org>; Wed, 24 Oct 2018 00:47:45 -0700 (PDT)
Date: Wed, 24 Oct 2018 00:47:44 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1540367264; bh=Ezp+0VumrJa7OVgykvEvJ/K4X+mFdLyveJy7nb4WSuc=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=zcUgGaf1QnL7dOHqlTPgAcsuv8uYZbC2AQG8XbRVzFAEAc54Amwhb+XjRLO5dB36D qjAphemuv65C0axNIQ7HGXh/wHchESrlSIrYjcJRwxJ5SDMIQCqc4wz7fgXlFTzZr4 ndNgSseieWd/EzlWpU71Q3rGyGQjPHtoGEaakq9I=
From: MikkelFJ <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4abca25efd006c7cac8e94932ec79ac95858684df1392cf0000000117e7e5a092a169ce164012de@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/1900/review/167760223@github.com>
In-Reply-To: <quicwg/base-drafts/pull/1900@github.com>
References: <quicwg/base-drafts/pull/1900@github.com>
Subject: Re: [quicwg/base-drafts] One close frames (#1900)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5bd023a01d553_546b3fbc4bed45bc822fd"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: mikkelfj
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/hauW2ev71TObdlJsj6YaqrJ_Tpg>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.29
List-Id: Notification list for GitHub issues related to the QUIC WG <quic-issues.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic-issues/>
List-Post: <mailto:quic-issues@ietf.org>
List-Help: <mailto:quic-issues-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Oct 2018 07:47:54 -0000

mikkelfj commented on this pull request.



> @@ -1268,8 +1268,9 @@ express the cause of a connection or stream error.
 
 ## HTTP/QUIC Error Codes {#http-error-codes}
 
-The following error codes are defined for use in QUIC RST_STREAM, STOP_SENDING,
-and APPLICATION_CLOSE frames when using HTTP/QUIC.
+The following error codes are defined for use in QUIC RST_STREAM frames,
+STOP_SENDING frames, and CONNECTION_CLOSE frames with a type of 0x03 when using
+HTTP/QUIC.

I like the idea of a single close frame, but if it is necessary to refer to frame sub-type by numerical value, I think the idea has gone too far.

> @@ -2133,25 +2133,25 @@ These states SHOULD persist for three times the current Retransmission Timeout
 
 An endpoint enters a closing period after initiating an immediate close
 ({{immediate-close}}).  While closing, an endpoint MUST NOT send packets unless
-they contain a CONNECTION_CLOSE or APPLICATION_CLOSE frame (see
-{{immediate-close}} for details).  An endpoint retains only enough information
-to generate a packet containing a closing frame and to identify packets as
-belonging to the connection.  The connection ID and QUIC version is sufficient
-information to identify packets for a closing connection; an endpoint can
-discard all other connection state.  An endpoint MAY retain packet protection
-keys for incoming packets to allow it to read and process a closing frame.
+they contain a CONNECTION_CLOSE frame (see {{immediate-close}} for details).  An
+endpoint retains only enough information to generate a packet containing a
+CONNECTION_CLOSE frame and to identify packets as belonging to the connection.
+The connection ID and QUIC version is sufficient information to identify packets
+for a closing connection; an endpoint can discard all other connection state.
+An endpoint MAY retain packet protection keys for incoming packets to allow it
+to read and process a CONNECTION_CLOSE frame.

This is outside the semantic changes of the PR, but I wonder if connection close retransmission could suffer from lack of address validation. Amplification attacks would only be an issue if the close packet is large. One could imagine a valid connection triggering a large close packet that is not acknowledged followed by a spoofed packets that redirects retransmission. I don't think this is practical, but perhaps some clarification on the subject would be helpful. For example recommending sending small close packets if not verified.

> @@ -2228,28 +2230,28 @@ Note:
   control, which are not expected to be relevant for a closed connection.
   Retransmitting the final packet requires less state.
 
-After receiving a closing frame, endpoints enter the draining state.  An
-endpoint that receives a closing frame MAY send a single packet containing a
-closing frame before entering the draining state, using a CONNECTION_CLOSE frame
-and a NO_ERROR code if appropriate.  An endpoint MUST NOT send further packets,
-which could result in a constant exchange of closing frames until the closing
-period on either peer ended.
+After receiving a CONNECTION_CLOSE frame, endpoints enter the draining state.
+An endpoint that receives a CONNECTION_CLOSE frame MAY send a single packet
+containing a CONNECTION_CLOSE frame before entering the draining state, using a
+CONNECTION_CLOSE frame and a NO_ERROR code if appropriate.  An endpoint MUST NOT
+send further packets, which could result in a constant exchange of
+CONNECTION_CLOSE frames until the closing period on either peer ended.
 

"An endpoint MUST NOT send further packets ...". Does that mean only the endpoint receiving the initial CLOSE frame, or both endpoints. In the latter case close retransmission is not possible, but that is inconsistent with other text.

> @@ -4055,9 +4053,11 @@ Final Offset:
 
 ## CONNECTION_CLOSE frame {#frame-connection-close}
 
-An endpoint sends a CONNECTION_CLOSE frame (type=0x02) to notify its peer that
-the connection is being closed.  CONNECTION_CLOSE is used to signal errors at
-the QUIC layer, or the absence of errors (with the NO_ERROR code).
+An endpoint sends a CONNECTION_CLOSE frame (type=0x02 or 0x03) to notify its
+peer that the connection is being closed.  The CONNECTION_CLOSE with a frame
+type of 0x02 is used to signal errors at the QUIC layer, or the absence of
+errors (with the NO_ERROR code).  The CONNECTION_CLOSE frame with a type of 0x03
+is used to signal an error with the protocol that uses QUIC.

I suggest defing a subtype name such as "a CONNECTION_CLOSE of subtype TRANSPORT_CLOSE (0x02) or APPLICATION_CLOSE (0x03)". See my comment on http draft on using explicit frame code 0x03. This makes it difficult for external documents to discuss QUIC, especially across versions where the code might change but the semantics remain.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1900#pullrequestreview-167760223