Re: [quicwg/base-drafts] Restore CID sequence numbers (#1465)

Martin Thomson <notifications@github.com> Fri, 22 June 2018 00:43 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 EE30E12F1A5 for <quic-issues@ietfa.amsl.com>; Thu, 21 Jun 2018 17:43:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.01
X-Spam-Level:
X-Spam-Status: No, score=-8.01 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, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01] 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 k1fnhyr98Ok3 for <quic-issues@ietfa.amsl.com>; Thu, 21 Jun 2018 17:43:40 -0700 (PDT)
Received: from out-7.smtp.github.com (out-7.smtp.github.com [192.30.252.198]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 007061294D0 for <quic-issues@ietf.org>; Thu, 21 Jun 2018 17:43:39 -0700 (PDT)
Date: Thu, 21 Jun 2018 17:43:38 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1529628218; bh=xZeEVif9BS3NdonKl9heeIqDjPfY3DWZzcHG3tmbdhU=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=gV+hc5jyujcEA6QV2tLZnmJirkaFsy54/ojjWtnZOSotkiNCqP/HtUbpu6kZq429I K/KDAnBi3G+tbjZx9aMUNT888bVnapOcliv7UioYrr7UWYhwj9lfGph5oBmm8/S/KZ d5K2f+Asu/RKRF1g9M+sfwE4FZAv1877Yj7R1nUk=
From: Martin Thomson <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4ab37313ee4f1d312a27e4e6b10ba2b1167ec76d34c92cf000000011744083a92a169ce13ec6080@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/1465/review/131035960@github.com>
In-Reply-To: <quicwg/base-drafts/pull/1465@github.com>
References: <quicwg/base-drafts/pull/1465@github.com>
Subject: Re: [quicwg/base-drafts] Restore CID sequence numbers (#1465)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5b2c463ad9ff7_9c43fc2502f8f804974e"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: martinthomson
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/SOY4IyN5S81wMHYP826vKL18N9c>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.26
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, 22 Jun 2018 00:43:43 -0000

martinthomson commented on this pull request.

Yeah, this is a little tricky.

> @@ -1834,7 +1834,12 @@ new connection IDs using the NEW_CONNECTION_ID frame.
 An endpoint might need to send packets on multiple networks without receiving
 any response from its peer.  To ensure that the endpoint is not linkable across
 each of these changes, a new connection ID is needed for each network.  To
-support this, multiple NEW_CONNECTION_ID messages are needed.
+support this, multiple NEW_CONNECTION_ID messages are needed.  Each
+NEW_CONNECTION_ID is marked with a sequence number.  Connection IDs MUST be used
+on only one local address, and each local address MUST advance to a connection

Perhaps
... on only one local address.  An endpoint MUST use a connection ID with a higher sequence number if it changes to using a different local address or network interface.  Once an endpoint has used a connection ID for packets sent from a given local address, they MUST NOT use a connection ID with a lower sequence number with that address.

> @@ -2613,6 +2627,14 @@ The NEW_CONNECTION_ID is as follows:
 
 The fields are:
 
+Sequence:
+
+: A variable-length integer.  This value starts at 0 and increases by 1 for each
+  connection ID that is provided by the server.  The connection ID that is
+  assigned during the handshake is assumed to have a sequence of -1.  That is,

There can be very many connection IDs during the handshake with this new Retry packet, so it's all special casing here.  Start at 2^16-N if you feel compelled to track things this way.

>  endpoint MUST NOT send additional packets until a NEW_CONNECTION_ID frame is
-received.
+received.  However, an implementation need not stop sending packets due to a gap
+in sequence numbers; it simply advances to the next currently-available
+connection ID it has received.  Connection IDs with earlier sequence numbers
+which arrive later MAY be retained for use on other local addresses or
+discarded.

OMG wall of text :)

When this happens, it's probably cause to create a new section.

FWIW, I like the idea that once you use a connection ID on a given interface, you can't use a lower-numbered one.  That could extend to responses.  Once you see a connection ID on a given tuple, then you can't use a lower-numbered one.  That leads to some simple rules:

When you use a new interface/address you MUST use of a new connection ID.
When you use a new connection ID, you MUST use one with a higher sequence number than you have ever used before.
You MUST NOT use a connection ID with a lower sequence number than you have either sent or received on that path.

Formulating the text around that is what we need.

> @@ -1834,7 +1834,12 @@ new connection IDs using the NEW_CONNECTION_ID frame.
 An endpoint might need to send packets on multiple networks without receiving
 any response from its peer.  To ensure that the endpoint is not linkable across
 each of these changes, a new connection ID is needed for each network.  To
-support this, multiple NEW_CONNECTION_ID messages are needed.
+support this, multiple NEW_CONNECTION_ID messages are needed.  Each
+NEW_CONNECTION_ID is marked with a sequence number.  Connection IDs MUST be used
+on only one local address, and each local address MUST advance to a connection

Or, create a new section on connection ID use along the lines I describe below and cite that instead.

-- 
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/1465#pullrequestreview-131035960