Re: NEW_CONNECTION_ID sequence numbers

Eric Kinnear <ekinnear@apple.com> Wed, 05 January 2022 20:49 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 07A173A0A8B for <quic@ietfa.amsl.com>; Wed, 5 Jan 2022 12:49:04 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.572
X-Spam-Level:
X-Spam-Status: No, score=-2.572 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, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable 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 lh9reO-pzu2E for <quic@ietfa.amsl.com>; Wed, 5 Jan 2022 12:48:59 -0800 (PST)
Received: from rn-mailsvcp-ppex-lapp45.apple.com (rn-mailsvcp-ppex-lapp45.rno.apple.com [17.179.253.49]) (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 A3D233A0A8E for <quic@ietf.org>; Wed, 5 Jan 2022 12:48:59 -0800 (PST)
Received: from pps.filterd (rn-mailsvcp-ppex-lapp45.rno.apple.com [127.0.0.1]) by rn-mailsvcp-ppex-lapp45.rno.apple.com (8.16.1.2/8.16.1.2) with SMTP id 205Klf12006079; Wed, 5 Jan 2022 12:48:56 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : message-id : content-type : mime-version : subject : date : in-reply-to : cc : to : references; s=20180706; bh=cm6cGZE07TaVWMvCEvlRpYSKs1uQ8T6nghv4ug2KYHs=; b=vIk+KQn6L6TDhYmevC23m5pSudfNloRDNJQgLxJWnQL0ALKQ6+jkWG2fpZjYKAKj+QZt K4pZhkBIx1UXfeOfeIE0j/6mbVGPXK1Yof3wjpPvk/wmAuQPFaYn08R/HQek5lOmUm2h yJaySpe+TiNGXERkKW1Bq07lS2OPxJbu1IASyG360wO7FUDULjjK0opfU2m1YWj/vUg8 6EFpnEc8vKtbOs443lUCFaXn7TvNo/aJpBfhA25Mnwg0VLjRhSrMqbQOuRGsl3Q/1wce PCTTrPOPkd9Y1ubuCbxAhlCb+QPGM+b7qTkdJDyB2mQcH1I6UKPP6mKlcE7HvtdPPpkJ zw==
Received: from rn-mailsvcp-mta-lapp02.rno.apple.com (rn-mailsvcp-mta-lapp02.rno.apple.com [10.225.203.150]) by rn-mailsvcp-ppex-lapp45.rno.apple.com with ESMTP id 3dap4xeyay-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 05 Jan 2022 12:48:56 -0800
Received: from rn-mailsvcp-mmp-lapp02.rno.apple.com (rn-mailsvcp-mmp-lapp02.rno.apple.com [17.179.253.15]) by rn-mailsvcp-mta-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.12.20210903 64bit (built Sep 3 2021)) with ESMTPS id <0R59005KQ8HJFZI0@rn-mailsvcp-mta-lapp02.rno.apple.com>; Wed, 05 Jan 2022 12:48:55 -0800 (PST)
Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp02.rno.apple.com by rn-mailsvcp-mmp-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.12.20210903 64bit (built Sep 3 2021)) id <0R59006008GKMG00@rn-mailsvcp-mmp-lapp02.rno.apple.com>; Wed, 05 Jan 2022 12:48:55 -0800 (PST)
X-Va-A:
X-Va-T-CD: e35a78e4c47125ab08eac8fd8a04005c
X-Va-E-CD: 4195a5e92f87252c9723dbd3a514223d
X-Va-R-CD: 8a861f6badba653d9c11d8064b589163
X-Va-CD: 0
X-Va-ID: 273cfdc8-4a35-4ae6-afae-067712738493
X-V-A:
X-V-T-CD: e35a78e4c47125ab08eac8fd8a04005c
X-V-E-CD: 4195a5e92f87252c9723dbd3a514223d
X-V-R-CD: 8a861f6badba653d9c11d8064b589163
X-V-CD: 0
X-V-ID: 202d6083-0ba1-49f1-8bbe-ace897810a7f
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425, 18.0.790 definitions=2022-01-05_07:2022-01-04, 2022-01-05 signatures=0
Received: from smtpclient.apple (unknown [17.234.48.2]) by rn-mailsvcp-mmp-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.12.20210903 64bit (built Sep 3 2021)) with ESMTPSA id <0R590070E8HIA200@rn-mailsvcp-mmp-lapp02.rno.apple.com>; Wed, 05 Jan 2022 12:48:54 -0800 (PST)
From: Eric Kinnear <ekinnear@apple.com>
Message-id: <05339396-B8CD-402A-89E9-C03451A7FF0D@apple.com>
Content-type: multipart/alternative; boundary="Apple-Mail=_444D8EAC-79D1-424B-BCD1-314ABF8B207C"
MIME-version: 1.0 (Mac OS X Mail 16.0 \(3696.80.41\))
Subject: Re: NEW_CONNECTION_ID sequence numbers
Date: Wed, 05 Jan 2022 12:48:54 -0800
In-reply-to: <CA+9kkMB310zU37BV7asV8oTF8EXby3WWz=ZDnQCXNPoA2aY1Rw@mail.gmail.com>
Cc: Ian Swett <ianswett=40google.com@dmarc.ietf.org>, Mirja Kuehlewind <mirja.kuehlewind=40ericsson.com@dmarc.ietf.org>, IETF QUIC WG <quic@ietf.org>, Martin Thomson <mt@lowentropy.net>, Kazuho Oku <kazuhooku@gmail.com>
To: Ted Hardie <ted.ietf@gmail.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>
X-Mailer: Apple Mail (2.3696.80.41)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425, 18.0.790 definitions=2022-01-05_07:2022-01-04, 2022-01-05 signatures=0
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/mkt9Ah-oV_rtINMn1Z79H8WbjJI>
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: Wed, 05 Jan 2022 20:49:04 -0000

My recollection is that a CID with sequence number 1 does not have special meaning whether or not it was delivered via preferred_address or in a NCID frame, it’s just a “regular” CID and can be used just like any other CID.

Given that, at some level the text in question becomes only an illustrative example, since sequence numbers must monotonically increase and since preferred_address arrives via the transport parameters, it will logically have sequence number 1. 

I think the text stating that it be the second one was added mostly to avoid ambiguity in terms of ordering with the initial CID and whether or not the initial CID “counted” (obviously ambiguity was not avoided successfully...).

The CID that arrived via preferred_address also counts against the limit just like any other CID. However, the text stays away from associating sequence number with the connection ID limit, instead referring only to “the number of active connection IDs”. Despite that, since the text is clear that “The sequence number on each newly issued connection ID MUST increase by 1”, it seems understandable to want to use the sequence number (along with the retired-prior-to sequence number) to enforce the active CID limit.

While it seems that these paragraphs are technically accurate, I would agree that the wording has several places that are ripe for confusion, which is something that we should improve.
It seems totally reasonable to clarify some of this in a future document update — would be happy to help wordsmith some text that makes things more clear.

Thanks,
Eric


> On Jan 5, 2022, at 6:36 AM, Ted Hardie <ted.ietf@gmail.com> wrote:
> 
> I agree that a short clarification would be helpful.  I did not implement this, but I would have used logic that resulted in a situation similar to Martin's, as it is non-intuitive to me that a connection ID of "1" has a special meaning in an initial connection and a different one if sent in a NEW_CONNECTION_ID.  Kazuho's text makes clear why my intuition is wrong, but it is pretty subtle to expect an implementer to catch.
> 
> regards,
> 
> Ted Hardie
> 
> On Wed, Jan 5, 2022 at 2:22 PM Ian Swett <ianswett=40google.com@dmarc.ietf.org <mailto:40google.com@dmarc.ietf.org>> wrote:
> I think a short clarification would be helpful, since I can see this being misread by others, but I have no opinion of whether it's an errata or not.
> 
> On Wed, Jan 5, 2022 at 8:37 AM Mirja Kuehlewind <mirja.kuehlewind=40ericsson.com@dmarc.ietf.org <mailto:40ericsson.com@dmarc.ietf.org>> wrote:
> If we want to keep a record we could also create an errata and ask the AD to set it into “held for document update” state…
> 
>  
> 
>  
> 
> From: QUIC <quic-bounces@ietf.org <mailto:quic-bounces@ietf.org>> on behalf of Kazuho Oku <kazuhooku@gmail.com <mailto:kazuhooku@gmail.com>>
> Date: Wednesday, 5. January 2022 at 07:21
> To: Martin Thomson <mt@lowentropy.net <mailto:mt@lowentropy.net>>
> Cc: IETF QUIC WG <quic@ietf.org <mailto:quic@ietf.org>>
> Subject: Re: NEW_CONNECTION_ID sequence numbers
> 
>  
> 
> Martin, thank you for bringing the issue to the list.
> 
>  
> 
> 2022年1月5日(水) 14:57 Martin Thomson <mt@lowentropy.net <mailto:mt@lowentropy.net>>:
> 
> Hey,
> 
> I discovered a problem in my implementation of NEW_CONNECTION_ID that quicly didn't like.  I was always skipping sequence number 1, even when there was no preferred address, which caused quicly to think that I was exceeding the limits it set.
> 
> Kazuho, Jana, and I all agree that my code was wrong, but I found it pretty hard to clearly identify how this was specified in the spec.  Here's what it says:
> 
> >  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.
> > 
> > Additional connection IDs are communicated to the peer using NEW_CONNECTION_ID frames (Section 19.15). The sequence number on each newly issued connection ID MUST increase by 1.
> 
> -- https://quicwg.org/base-drafts/rfc9000.html#name-issuing-connection-ids <https://protect2.fireeye.com/v1/url?k=31323334-501d5122-313273af-454445555731-2a7ac3727495dfff&q=1&e=2924cc42-2683-482a-9fc8-11e09e03a8df&u=https%3A%2F%2Fquicwg.org%2Fbase-drafts%2Frfc9000.html%23name-issuing-connection-ids>
> 
> Is it abundantly clear that I'm wrong based on this?  Did I miss a clearer piece of text elsewhere?  Or, should we be looking to open an erratum?
> 
>  
> 
> I think that the cited text is the only place that discusses this, and regarding the text we have now, it seems to me that it clearly *implies* that if preferred_address TP is omitted, then the CID(seqnum=1) should be carried by a NEW_CONNECTION_ID frame.
> 
>  
> 
> If we were to skip CID(seqnum=1) when preferred_address TP is omitted, then we would have not used a clause like "if the preferred_address transport parameter is sent." Instead, we would have omitted the if clause or said like "regardless of preferred_address transport parameter being sent."
> 
>  
> 
> Therefore, my personal view is that an erratum is *not* required. However, I agree generally that implications are a source of confusion. If we are to revise the spec, this is one place that we can do better.
> 
>  
> 
> Anyways. Even if we are to conclude that an erratum is unnecessary, it is always good to keep a record of how potentially confusing text should be read (or be improved in the next revision). To that respect, I appreciate your bringing this issue to the list regardless of how we would conclude.
> 
>  
> 
> 
> Cheers,
> Martin
> 
> 
> 
> --
> 
> Kazuho Oku
>