Re: Demultiplexing QUIC

Kazuho Oku <kazuhooku@gmail.com> Sun, 23 July 2023 18:46 UTC

Return-Path: <kazuhooku@gmail.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 33E6AC14CF1F for <quic@ietfa.amsl.com>; Sun, 23 Jul 2023 11:46:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.095
X-Spam-Level:
X-Spam-Status: No, score=-2.095 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZvWrN08Ij25K for <quic@ietfa.amsl.com>; Sun, 23 Jul 2023 11:46:06 -0700 (PDT)
Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9DF4FC14F75F for <quic@ietf.org>; Sun, 23 Jul 2023 11:46:06 -0700 (PDT)
Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-51e56749750so5136443a12.0 for <quic@ietf.org>; Sun, 23 Jul 2023 11:46:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690137965; x=1690742765; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=OsfXX5V+9mwdl5hUeSCelujIl5S5XDS2aLcn12D1uTI=; b=n4LAy8ipS1vzwVPMXzQt491b1aPMgIuGHVaVFDqpJtK/MT/a24fnk0zHkS114QHs5z 2wlQXlp1e2J3935XczBgjCz3luThMEhg9i2/GxqoD/CDyRPT+QYCLtnZ6uAHeHBazoW1 Z6PFhEBpOw8lPGluz+klF/dlxNXmBw4q3+ByvK0S2GypCvL8QWIV+PE2VjCVngpEfTna /AAVy3CU5Jl5J3TmM9kCSp+3GHDyR/jXcBEYrToQSkVYVqC7fgmg2VHg1CtZ+ADehOTq P5vbO8VTVxD6m90CMrKBlbmUZyIgJ5vG+Uq+7KmyzEer/eQnMvWrI1TRojJ+ll5QaFwr V29w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690137965; x=1690742765; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OsfXX5V+9mwdl5hUeSCelujIl5S5XDS2aLcn12D1uTI=; b=jGBXW4r/lneJZW+yfRGnWVwSz/RHysJHQUMJ+nOdbMn6cwXBZ0gLY/egSHAooX2e2y oBBEd/cX3w5aBSXwFv0TEUo8kkfkXDyYv05ls3JCl8bkcbZ6fYlqUaHD6QOZYCdS6Y2z DiBXE8ygDI3GuOC0+zxJIXpmCU62LrNNnMfDSCZC1yAn2WuxPcwG86kMkSqqh37OFul5 i/4pAEys1bXgTfIeS4DQw7PT+ePSECaX6pwY34rM5qfPMIpmnnnajrKT/fH+e7tsU0Jd Q5B1nbrHWnmnNFpooHBFc1nb2+dpbzTmmQZ7fkS/WLEZR/g6jHMBCKECU83c9lsAYTON mAXg==
X-Gm-Message-State: ABy/qLb/ULqhJE8ZZB1zeMGQdKWbrbhprS076j1mlcfCO/zgAstDxOEA LU6uSVOzR8VWF0IPfzeai7Becr7TiXUw3a4THHpdZwPk+PXgfQ==
X-Google-Smtp-Source: APBJJlHhry9JTlLMOvrVoIegpqkYm600Y1GEdOrnn8F7i1ZPCfZNTzwwhz6mgfXBL2a8dxFb90MwOVktg/0Kjdkl4gw=
X-Received: by 2002:aa7:dcd7:0:b0:522:1d47:2d81 with SMTP id w23-20020aa7dcd7000000b005221d472d81mr3795270edu.17.1690137964768; Sun, 23 Jul 2023 11:46:04 -0700 (PDT)
MIME-Version: 1.0
References: <CAOYVs2o+KTz=0vO+a=c_3ORGLHGyKJGQKK=DCqW3bAbh-LvbOA@mail.gmail.com> <CANatvzzqiDCbk_SERYTXaj9jeurDUVfKc=9kXMYs25BhnmLxKg@mail.gmail.com> <CALGR9oYRw0nsO19YT5V32BOE3LBNbWMiYFE7ajUezKbU+z1mzQ@mail.gmail.com> <CAOYVs2qxtxBqCTcKqVTCAZtZ8KayF5JYb9fg3Je6GKyVgbtWAg@mail.gmail.com>
In-Reply-To: <CAOYVs2qxtxBqCTcKqVTCAZtZ8KayF5JYb9fg3Je6GKyVgbtWAg@mail.gmail.com>
From: Kazuho Oku <kazuhooku@gmail.com>
Date: Sun, 23 Jul 2023 11:45:53 -0700
Message-ID: <CANatvzz1fKa6LE8MP8kLSG0Koa+u07ogALtKbPiA39HeihHmdA@mail.gmail.com>
Subject: Re: Demultiplexing QUIC
To: Marten Seemann <martenseemann@gmail.com>
Cc: Lucas Pardue <lucaspardue.24.7@gmail.com>, QUIC WG <quic@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000000304c306012be95c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/pEt4QjJP4nUEjCIBgnyTCzAT1Vo>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.39
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: Sun, 23 Jul 2023 18:46:11 -0000

2023年7月23日(日) 11:14 Marten Seemann <martenseemann@gmail.com>:

> A server deployed on the public internet never knows what other protocols
> the client is demultiplexing with QUIC, so the QUIC bit always needs to be
> set to 1. Maybe this should even be a "MUST, unless the server has
> out-of-band knowledge that the client is not demultiplexing"?
>

I think "SHOULD" as we state now might be better than a "MUST."

Version Negotiation packets are unique in the sense that "inherently not
version specific" (section 17.2.1). Rather, a Version Negotiation packet
has to abide by the specifications of all the version numbers that it
carries.

Considering that, I think it is not incorrect to state that all version 1
packets have the QUIC bit set and at the same time stating that Version
Negotiation packets might not have the bit set.


>
> As Lucas pointed out, the fact the client is offering the Greasing the
> QUIC Bit extension can be seen as an indication that the client doesn't
> care about demultiplexing, but it's unlikely that the server would be able
> to (or willing to) parse the transport parameters for a QUIC version that
> it's going to send a Version Negotiation packet for.
>
> On Sun, 23 Jul 2023 at 11:04, Lucas Pardue <lucaspardue.24.7@gmail.com>
> wrote:
>
>> Hey,
>>
>> On Sun, Jul 23, 2023 at 6:40 PM Kazuho Oku <kazuhooku@gmail.com> wrote:
>>
>>> 2023年7月22日(土) 15:24 Marten Seemann <martenseemann@gmail.com>:
>>>
>>>> RFC 9443 defines how to demultiplex QUIC from a whole range of other
>>>> protocols. Packets in the range 128..191 (i.e. all packets starting with
>>>> 0b10xxxxxx) are supposed to be forwarded to RTP/RTCP.
>>>>
>>>> This mostly works, since QUIC v1 packets (both short and long header)
>>>> define the "QUIC bit", the second bit (0x40) to be set to 1. On the other
>>>> hand, Version Negotiating packets are defined as 0b1xxxxxxx, where the last
>>>> 7 bits are an arbitrary value. RFC 8999 defines these bits as unused, and
>>>> it's up to the server to decide how to set these bits. Specifically, it's a
>>>> valid strategy to set them to a fixed value. If that value starts with a 0,
>>>> Version Negotiation packets would be consistently mis-classified as RTP
>>>> packets.
>>>>
>>>> Section 17.2.1 of RFC 9000 says that servers SHOULD set the first of
>>>> the unused bits to 1 "where QUIC might be multiplexed with other
>>>> protocols". This advice is fine for some deployments, but in the general
>>>> case, the server has no way of knowing what other things the client is
>>>> demultiplexing on the same UDP socket.
>>>>
>>>
>>> I actually think that this "where QUIC might be multiplexed other
>>> protocols" could be an error in RFC 9000. FWIW, this condition was
>>> introduced very late, in https://github.com/quicwg/base-drafts/pull/4744
>>> .
>>>
>>> I think what we really wanted to mean here is "unless an endpoint knows
>>> that the peer is not demultiplexing."
>>>
>>
>> I tend to agree with this.
>>
>> Interestingly, the Greasing the QUIC Bit RFC claims "The second-most
>> significant bit of the first byte in every QUIC packet is defined as having
>> a fixed value in QUIC version 1 [QUIC
>> <https://www.rfc-editor.org/rfc/rfc9287.html#RFC9000>]." but that is
>> clearly not true for the Version Negotiation packet because the requirement
>> is only a SHOULD. I don't think the grease setting really applies though,
>> because the server wouldn't know to apply it. Therefore if a sever knows
>> the client doesn't need the bit for demultiplexing, perhaps it "SHOULD
>> set the QUIC Bit to an unpredictable value"?
>>
>> Cheers
>> Lucas
>>
>

-- 
Kazuho Oku