Re: [quicwg/base-drafts] Address validation for connection migration (#732)

janaiyengar <notifications@github.com> Fri, 13 October 2017 19:20 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 5B302126BF0 for <quic-issues@ietfa.amsl.com>; Fri, 13 Oct 2017 12:20:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.8
X-Spam-Level:
X-Spam-Status: No, score=-9.8 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-2.8, 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 mBmS4leTqsVS for <quic-issues@ietfa.amsl.com>; Fri, 13 Oct 2017 12:20:18 -0700 (PDT)
Received: from github-smtp2b-ext-cp1-prd.iad.github.net (github-smtp2-ext3.iad.github.net [192.30.252.194]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E4F8C132A89 for <quic-issues@ietf.org>; Fri, 13 Oct 2017 12:20:17 -0700 (PDT)
Date: Fri, 13 Oct 2017 12:20:17 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1507922417; bh=LCc26dY1JLwAks0BwZVZZ8PSAD6RJpuRSY4ZI6Szq8g=; h=From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=hj/5DbVIxErBsSumVO7bwowpOyS77tUn1Sk4C13GfzbWkPuGluLWgcTXRRPk+vw0p eOe3tp1OfnmT3rckqV643CWjHHrKTfg4g8kSpbPYAASUH+mzQdsMoyN80bDi8vZnaA hM+VmQnsdXcR5i6xZKf6ANpmSssgXgTUZX2JpMPc=
From: janaiyengar <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4abd39f9e9c3f16011816aa716f36c58832439b609a92cf0000000115f8d3f092a169ce0ee9dd49@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/732/review/69323047@github.com>
In-Reply-To: <quicwg/base-drafts/pull/732@github.com>
References: <quicwg/base-drafts/pull/732@github.com>
Subject: Re: [quicwg/base-drafts] Address validation for connection migration (#732)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_59e111f15a1c_bb93faceb59cf2c52515"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: janaiyengar
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/JVpb593XuJ4lSkm8BUTrAXJ27x4>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.22
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: Fri, 13 Oct 2017 19:20:21 -0000

janaiyengar requested changes on this pull request.

This PR conflates a few things, which will make it harder to land the simpler things. I would simply add the frame type and rules around using PING/PONG in one PR, and then discuss address validation in a separate PR, since that will need quite a bit of discussion. I don't mind having that discussion on an issue. I don't think this PR is ready to be submitted.

> @@ -1351,6 +1355,14 @@ connection when they move networks.  This includes state that can be hard to
 recover such as outstanding requests, which might otherwise be lost with no easy
 way to retry them.
 
+An endpoint that receives packets that contain a source IP address and port that

We're definitely learning that having the ability to probe is quite useful even for connection migration. I've been working on redesigning connection migration, and our experience has shown that there needs to be more nuance around connection migration than simply switching away on the first packet. I don't want normative language here yet. I would suggest, for the sake of getting this PR in, to rephrase the MUST below to be non-normative ("should start sending", not capitalized.) We can then do an issue about what to do around connection migration separately, and figure out what should be normative.

> +
+Once a connection is established, address validation is relatively simple (see
+{{address-validation}} for the process that is used during the handshake).  An
+endpoint validates a remote address by sending a PING frame containing a payload
+that is hard to guess.  This frame MUST be sent in a packet that is sent to the
+new address.  Once a PONG frame containing the same payload is received, the
+address is considered to be valid.  The PONG frame can use any path on its
+return.  A PING frame containing 12 randomly generated {{?RFC4086}} octets is
+sufficient to ensure that it is easier to receive the packet than it is to guess
+the value correctly.
+
+Note:
+
+: Retransmissions of the PING frame MUST also use the same remote address.
+
+If validation of the new remote address fails, after allowing enough time for

Yes, agreed. We don't want to terminate the connection because a new path that we want to switch to doesn't work.

> +the value correctly.
+
+Note:
+
+: Retransmissions of the PING frame MUST also use the same remote address.
+
+If validation of the new remote address fails, after allowing enough time for
+possible loss and recovery of packets carrying PING and PONG frames, the
+endpoint MUST terminate the connection.  When setting this timer,
+implementations are cautioned that the new path could have a longer round trip
+time than the original.  The endpoint MUST NOT send a CONNECTION_CLOSE frame in
+this case; it has to assume that the remote peer does not want to receive any
+more packets.
+
+If the remote address is validated successfully, the endpoint MAY increase the
+rate that it sends on the new path using the state from the previous path.  The

I would remove the entire paragraph here and simply replace with "If the remote address is validated successfully, the endpoint SHOULD reset the congestion controller to its initial state."

> +
+After verifying an address, the endpoint SHOULD update any address validation
+tokens ({{address-validation}}) that it has issued to its peer if those are no
+longer valid based on the changed address.
+
+Address validation using the PING frame MAY be used at any time by either peer.
+For instance, an endpoint might check that a peer is still in possession of its
+address after a period of quiescence.
+
+Upon seeing a connection migration, an endpoint that sees a new address MUST
+abandon any address validation it is performing with other addresses on the
+expectation that the validation is likely to fail.  Abandoning address
+validation primarily means not closing the connection when a PONG frame is not
+received, but it could also mean ceasing retransmissions of the PING frame.  An
+endpoint that doesn't retransmit a PING frame might receive a PONG frame, which
+it MUST ignore.

This paragraph is unnecessary. Using PINGs on alt paths is fine, you don't want to start sending data on all of them. 

>  
-The PING frame can be used to keep a connection alive when an application or
-application protocol wishes to prevent the connection from timing out.  An
+~~~
+ 0                   1                   2                   3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Pong Length(8)|              Pong Data (*)                  ...

Calling this data length and PING data avoids confusion.

> ++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+~~~
+
+Pong Length:
+
+: This 8-bit value describes the length of the Pong Data field.
+
+Pong Data:
+
+: This variable-length field contains arbitrary data.
+
+The receiver of a PING frame with a Pong Data field that is empty simply needs
+to acknowledge the packet containing this frame.
+
+If the Pong Data is not empty, the recipient of this frame MUST generate a PONG
+frame ({{frame-pong}}) containing the same Pong Data.

It's easiest if the PING also generates an ack. Separately, the PONG packet will require an ack.

> @@ -1984,6 +2122,18 @@ Stream ID:
 Error Code:
 : The application-specified reason the sender is ignoring the stream.
 
+
+## PONG Frame {#frame-pong}
+
+The PONG frame (type=0x0d) is sent in response to a PING frame that contains
+data.  Its format is identical to the PING frame ({{frame-ping}}).
+
+An endpoint that receives an unsolicited PONG frame - that is, a PONG frame
+containing a payload that is either empty or not identical to the content of a
+PING frame that the endpoint previously sent - MUST generate a connection error
+of type UNSOLICITED_PONG.

A PONG frame needs to be acked.

-- 
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/732#pullrequestreview-69323047