Re: NEW_CONNECTION_ID sequence numbers

Christian Huitema <huitema@huitema.net> Wed, 05 January 2022 21:03 UTC

Return-Path: <huitema@huitema.net>
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 1B55D3A0B57 for <quic@ietfa.amsl.com>; Wed, 5 Jan 2022 13:03:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.602
X-Spam-Level:
X-Spam-Status: No, score=-2.602 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, NICE_REPLY_A=-0.714, SPF_HELO_NONE=0.001, T_SPF_PERMERROR=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 K3Vd8aoIvQFR for <quic@ietfa.amsl.com>; Wed, 5 Jan 2022 13:03:07 -0800 (PST)
Received: from mx43-out1.antispamcloud.com (mx43-out1.antispamcloud.com [138.201.61.189]) (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 4160E3A0B53 for <quic@ietf.org>; Wed, 5 Jan 2022 13:03:07 -0800 (PST)
Received: from xse284.mail2web.com ([66.113.197.30] helo=xse.mail2web.com) by mx136.antispamcloud.com with esmtp (Exim 4.92) (envelope-from <huitema@huitema.net>) id 1n5DQr-000DQK-Ie for quic@ietf.org; Wed, 05 Jan 2022 22:02:58 +0100
Received: from xsmtp21.mail2web.com (unknown [10.100.68.60]) by xse.mail2web.com (Postfix) with ESMTPS id 4JThlJ3CJKzBFd for <quic@ietf.org>; Wed, 5 Jan 2022 13:02:52 -0800 (PST)
Received: from [10.5.2.17] (helo=xmail07.myhosting.com) by xsmtp21.mail2web.com with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from <huitema@huitema.net>) id 1n5DQq-0003lK-B1 for quic@ietf.org; Wed, 05 Jan 2022 13:02:52 -0800
Received: (qmail 28592 invoked from network); 5 Jan 2022 21:02:51 -0000
Received: from unknown (HELO [192.168.200.66]) (Authenticated-user:_huitema@huitema.net@[72.235.197.84]) (envelope-sender <huitema@huitema.net>) by xmail07.myhosting.com (qmail-ldap-1.03) with ESMTPA for <ekinnear=40apple.com@dmarc.ietf.org>; 5 Jan 2022 21:02:51 -0000
Message-ID: <f7a809af-4bb7-5564-f4c1-1b4d9cb3a1c7@huitema.net>
Date: Wed, 05 Jan 2022 11:02:49 -1000
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1
Subject: Re: NEW_CONNECTION_ID sequence numbers
Content-Language: en-US
To: Eric Kinnear <ekinnear=40apple.com@dmarc.ietf.org>, Ted Hardie <ted.ietf@gmail.com>
Cc: Mirja Kuehlewind <mirja.kuehlewind=40ericsson.com@dmarc.ietf.org>, IETF QUIC WG <quic@ietf.org>, Kazuho Oku <kazuhooku@gmail.com>, Martin Thomson <mt@lowentropy.net>, Ian Swett <ianswett=40google.com@dmarc.ietf.org>
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>
From: Christian Huitema <huitema@huitema.net>
In-Reply-To: <05339396-B8CD-402A-89E9-C03451A7FF0D@apple.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
X-Originating-IP: 66.113.197.30
X-Spampanel-Domain: xsmtpout.mail2web.com
X-Spampanel-Username: 66.113.197.0/24
Authentication-Results: antispamcloud.com; auth=pass smtp.auth=66.113.197.0/24@xsmtpout.mail2web.com
X-Spampanel-Outgoing-Class: unsure
X-Spampanel-Outgoing-Evidence: Combined (0.15)
X-Recommended-Action: accept
X-Filter-ID: Pt3MvcO5N4iKaDQ5O6lkdGlMVN6RH8bjRMzItlySaT9WLQux0N3HQm8ltz8rnu+BPUtbdvnXkggZ 3YnVId/Y5jcf0yeVQAvfjHznO7+bT5x6h2yQpzTslcOqazQkKtAFKj/EwzSHE5FGYwwjsNRPCJDq j5zu1gxoCCFAKHLEXvfmD6wdmZPcItWbGe10hXJtXL4FsauCVkDjmcYJdU3yWp7KuHNaaKdg7iBE ZefdsNUFWKwa/wzJUjmazeC7ImcavsxcG+zHEnhonqzkSatM/RQ6V51u76v35b1wNe/MvdLom48E g3of4Y9DlgiJ0nAJ2+J9PgaoF8SQHto3le4zsHTaeQtlKubP6iUTjj6yPARK6buALVaA782LKxg6 vRmng8N1aLhXqdc+jC1RcnVud53D5caUhbVtvqItBqoizkEt9O20UjkwI0v+LOlw05G4BS+iyyNq bT8dUMXMJ4tUCMj6G37ZfAMLceP5aNHPt26RBupu5v1nytoNnc138GfEJRQ2qC7jjynPIHPNqSn4 QTXUjLjYWQt1/5xnQymMoPsgr/U0flMcy2Vi/IcBgY4arPaiJ1W6hAyiRC61jekdwIcXNugoOEbH RyFULpSjm7jZ1h/HfDRQ5Ig8VhPsPE8NQ/T3Op6Um662jkOH4BxhazaAAWw34cVPzJI1wR5KRuT3 UESwZzFm2lzXVvYKmbn2DRojSVizNl0ce/s7u0P9b7Oijoc3SCZfWp1RjkjWCw/vIUzTXkDAiiJi mGhLUFuS2lhaIetXfCg1JdAVrOwKfAQ724VwF7Ol22vf0H+S0VtUoFIvD3sIcP1fhJPM6B/8FWbt jKWFR53a/Pdb0tYXDnnLWJD1TphEa9wfh5+++hc37Fo9Xqg2bQC831cpDah1dhLxae/ivb4tNDeh qlqcD20AuXq0T17woJo3avKeADIsy647Mn0zwmGzAi3Zn+YdthRNgs7Ig4l/XErpYn3glZTKFuaT l19W3ISq9+1KiLsESGU+y+fjdgjudZxiTPi+MG1QP35nsYfP84c+RFK3KiZuZ5OAUoGBziSYFLZu u6zX3xxsmqT8l9ARlsTalAaf
X-Report-Abuse-To: spam@quarantine11.antispamcloud.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/7mggh68lSQtLI4MJarqylySoZEQ>
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 21:03:12 -0000

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.

-- Christian Huitema

On 1/5/2022 10:48 AM, Eric Kinnear wrote:
> 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
>>
>