Re: NEW_CONNECTION_ID sequence numbers

Eric Kinnear <ekinnear@apple.com> Thu, 06 January 2022 00:34 UTC

Return-Path: <ekinnear@apple.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 365813A0EF9 for <quic@ietfa.amsl.com>; Wed, 5 Jan 2022 16:34:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.674
X-Spam-Level:
X-Spam-Status: No, score=-2.674 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.576, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=apple.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 8NzEbSn6Ra3e for <quic@ietfa.amsl.com>; Wed, 5 Jan 2022 16:34:36 -0800 (PST)
Received: from ma1-aaemail-dr-lapp01.apple.com (ma1-aaemail-dr-lapp01.apple.com [17.171.2.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 893543A0ED7 for <quic@ietf.org>; Wed, 5 Jan 2022 16:34:36 -0800 (PST)
Received: from pps.filterd (ma1-aaemail-dr-lapp01.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp01.apple.com (8.16.0.42/8.16.0.42) with SMTP id 2060Vspr029898; Wed, 5 Jan 2022 16:34:35 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=20180706; bh=ESXm/iolkjKR8dyVDLGDHpNHkyATRzTiR+xwsZs4+0Y=; b=lB8yCAKDa5Vl2Y4iM+fb440uo1PJJPqktVv8wbNB9+UYF/OPZgWbDjKydpQlIMyXbCOa w+izjqnpr5Zf7tQ4vRrx4rUo/Epi0OSB2wlkh2OFTD19/EhJRzWewcszYerBzCol32g9 8NOlet0rQAZieFDeNMcIzpirAX34eRmXgYm2N+JaCGB1pbHDfThz30VwA9nGKzAWV3Nd k2I+ZogJCQl/dS5alOwvvlDiQD9xe1lSVoaYI4632+pa9Gh/Y2e3ymQFHU7zuVsTR6ia e6hoyxxbEfqTi7K44HHP8HBZp/yklJVlslNyHyZd9wPr/pEqOxngh/Q0QrlDHZe7SYAP 1w==
Received: from rn-mailsvcp-mta-lapp03.rno.apple.com (rn-mailsvcp-mta-lapp03.rno.apple.com [10.225.203.151]) by ma1-aaemail-dr-lapp01.apple.com with ESMTP id 3ddn7e8jsk-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 05 Jan 2022 16:34:35 -0800
Received: from rn-mailsvcp-mmp-lapp01.rno.apple.com (rn-mailsvcp-mmp-lapp01.rno.apple.com [17.179.253.14]) by rn-mailsvcp-mta-lapp03.rno.apple.com (Oracle Communications Messaging Server 8.1.0.12.20210903 64bit (built Sep 3 2021)) with ESMTPS id <0R5900IGZIXLEBM0@rn-mailsvcp-mta-lapp03.rno.apple.com>; Wed, 05 Jan 2022 16:34:33 -0800 (PST)
Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp01.rno.apple.com by rn-mailsvcp-mmp-lapp01.rno.apple.com (Oracle Communications Messaging Server 8.1.0.12.20210903 64bit (built Sep 3 2021)) id <0R5900Y00IPT4X00@rn-mailsvcp-mmp-lapp01.rno.apple.com>; Wed, 05 Jan 2022 16:34:33 -0800 (PST)
X-Va-A:
X-Va-T-CD: 01a37c4388be431533d60b3d58eeb299
X-Va-E-CD: 4195a5e92f87252c9723dbd3a514223d
X-Va-R-CD: 8a861f6badba653d9c11d8064b589163
X-Va-CD: 0
X-Va-ID: bee95a61-e0d1-47df-88e4-2905c5f49dd5
X-V-A:
X-V-T-CD: 01a37c4388be431533d60b3d58eeb299
X-V-E-CD: 4195a5e92f87252c9723dbd3a514223d
X-V-R-CD: 8a861f6badba653d9c11d8064b589163
X-V-CD: 0
X-V-ID: 185cb59b-bec6-4f2a-8bdb-7b6c0130a23c
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425, 18.0.790 definitions=2022-01-05_08:2022-01-04, 2022-01-05 signatures=0
Received: from smtpclient.apple (unknown [17.234.42.145]) by rn-mailsvcp-mmp-lapp01.rno.apple.com (Oracle Communications Messaging Server 8.1.0.12.20210903 64bit (built Sep 3 2021)) with ESMTPSA id <0R5900Y81IXKFN00@rn-mailsvcp-mmp-lapp01.rno.apple.com>; Wed, 05 Jan 2022 16:34:32 -0800 (PST)
Content-type: text/plain; charset="utf-8"
MIME-version: 1.0 (Mac OS X Mail 16.0 \(3696.80.21\))
Subject: Re: NEW_CONNECTION_ID sequence numbers
From: Eric Kinnear <ekinnear@apple.com>
In-reply-to: <af418a2b-9789-4ce0-9fc8-533096cc3a1c@beta.fastmail.com>
Date: Wed, 05 Jan 2022 16:34:32 -0800
Cc: IETF QUIC WG <quic@ietf.org>
Content-transfer-encoding: quoted-printable
Message-id: <9136B1D9-5205-46DE-A1E0-274DB4ADE881@apple.com>
References: <27e024ed-a78f-416e-869d-82930c7388a3@beta.fastmail.com> <CANatvzyq_sftiTeEEWi3JpYm1+bQS3TsC+wiUxksTpAP0h9gmQ@mail.gmail.com> <A5417EA8-BF3F-4CAE-B2B8-01E5715154E7@ericsson.com> <CAKcm_gNXiRUgj4t=xoC_J13rcd5YfsuvtSzVPGz3hpYHc7fmLg@mail.gmail.com> <CA+9kkMB310zU37BV7asV8oTF8EXby3WWz=ZDnQCXNPoA2aY1Rw@mail.gmail.com> <05339396-B8CD-402A-89E9-C03451A7FF0D@apple.com> <f7a809af-4bb7-5564-f4c1-1b4d9cb3a1c7@huitema.net> <af418a2b-9789-4ce0-9fc8-533096cc3a1c@beta.fastmail.com>
To: Martin Thomson <mt@lowentropy.net>
X-Mailer: Apple Mail (2.3696.80.21)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425, 18.0.790 definitions=2022-01-05_08:2022-01-04, 2022-01-05 signatures=0
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/4vQ4thOUcjE222ubUsaOX-qmt64>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
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: Thu, 06 Jan 2022 00:34:41 -0000

That seems like a reasonable proposal to me! 


In terms of clarity on the other points that have come up in this thread, I double checked and it looks like we’ve got good text stating that: 
1. The preferred_address CID is interchangeable with any other CID acquired via NCID frames
2. The active_connection_id_limit (and the set of “active” CIDs) includes the preferred_address and initial CID

So that covers everything I think we’ve seen so far.

Thanks,
Eric

=========

5.1.1 Issuing Connection IDs
…
Connection IDs that are issued and not retired are considered active; any active connection ID is valid for use with the current connection at any time, in any packet type. This includes the connection ID issued by the server via the preferred_address transport parameter.

https://quicwg.org/base-drafts/rfc9000.html#section-5.1.1-3 



9.6.1. Communicating a Preferred Address
...
Once the handshake is confirmed, the client SHOULD select one of the two addresses provided by the server and initiate path validation (see Section 8.2). A client constructs packets using any previously unused active connection ID, taken from either the preferred_address transport parameter or a NEW_CONNECTION_ID frame.

https://quicwg.org/base-drafts/rfc9000.html#section-9.6.1-3



9.6.3. Interaction of Client Migration and Preferred Address
...
The connection ID provided in the preferred_address transport parameter is not specific to the addresses that are provided. This connection ID is provided to ensure that the client has a connection ID available for migration, but the client MAY use this connection ID on any path.

https://quicwg.org/base-drafts/rfc9000.html#section-9.6.3-6



18.2. Transport Parameter Definitions
…
active_connection_id_limit (0x0e):
...
This value includes the connection ID received during the handshake, that received in the preferred_address transport parameter, and those received in NEW_CONNECTION_ID frames.

https://quicwg.org/base-drafts/rfc9000.html#section-18.2-6.2.1


> On Jan 5, 2022, at 4:19 PM, Martin Thomson <mt@lowentropy.net> wrote:
> 
> 
> On Thu, Jan 6, 2022, at 08:02, Christian Huitema wrote:
>> When implementing Picoquic, I interpreted the specification as: if 
>> sending a CID as part of preferred address extension, use #1, otherwise 
>> use #1 for the next CID to be sent in "NEW CONNECTION ID" frame. I did 
>> not find the specification ambiguous. But maybe that's just me.
> 
> It's good that I'm the only one who implemented it incorrectly.  I'll get on to fixing it promptly.
> 
> In terms of clarifications, what do people think about this:
> 
> The sequence number of the initial connection ID is 0. If the preferred_address transport parameter is sent, the sequence number of the supplied connection ID is 1.
> +The sequence number for NEW_CONNECTION_ID frames starts at 2 when the preferred_address transport parameter is sent and 1 otherwise.
> 
> I can open an erratum with that as Mirja suggests.
> 
>