Re: [HTTP/3]Sending reserved frame before SETTINGS

Ian Swett <ianswett@google.com> Tue, 04 February 2020 11:12 UTC

Return-Path: <ianswett@google.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 67975120108 for <quic@ietfa.amsl.com>; Tue, 4 Feb 2020 03:12:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.499
X-Spam-Level:
X-Spam-Status: No, score=-17.499 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.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 125lMSsh7jxQ for <quic@ietfa.amsl.com>; Tue, 4 Feb 2020 03:12:03 -0800 (PST)
Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 089C8120130 for <quic@ietf.org>; Tue, 4 Feb 2020 03:12:03 -0800 (PST)
Received: by mail-wr1-x432.google.com with SMTP id m16so22441896wrx.11 for <quic@ietf.org>; Tue, 04 Feb 2020 03:12:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pIPrcJqCNHHYxEKCPQ5LY6Pc5NkgICEw6m/GwKalnlM=; b=kRWw+6g60o4Y8O83m800iksat2n/9keaKcENeAX1gzt/IX3xbU/priCyl3HGyRMfjD lxPjqjbm7ltakUfs28xteFxlklKbJZROfO8WxeA1+R3CRTm8QUIWGSshJgaJo5qeYWrb +SGxNu5ozikepz/nHFKBcoNPD0GEz0rePS8AiQdgQRcM3Wb/tfotO0TcirA/jb+MCaBT MEsi9Br3D5FFoSUNGmjPKzRVU00To613zhBjI2zjK4IffntVJrHjuBX4PdBUIEGEmiRt OkRMeSSz7Cycj9/JnPa31jutgMQBVdt+pbu/6Rski9wFY/ZAibGDHySelz6ao3b/z5ce JxIw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pIPrcJqCNHHYxEKCPQ5LY6Pc5NkgICEw6m/GwKalnlM=; b=Xw2jzGkxKQqgk18TDIpWg6t/JPuJRaQsWaqTFmG+8O9T/5/20Lzd1j82U3IvNS/AMJ Jy4CkJUWgbm7+DDhgkG1iMQBA4UcC2FKGJsTQcHFC5CwwVwoyuokLlMuhIYMr2yAU46F TQ3aDrXCIFeFynVcmpOwtaFmf8bHgI0n45A91AlaXBZA3Nxtr1Q+8WFbfz9tkUYqjHe1 Yj3oJU7KaUH4Lo9qIJyzG53RSySTOxfxT6yWTB+tY4BYfvCPHtFSqX3hkGakGKPPAdMh 8GKNuxrY4XcEyHjeXgnPAFnQW20oDmBwFc+ZWy0lDh83/sb5Vzbg5Fx5YEEzKC0whfcQ IwTQ==
X-Gm-Message-State: APjAAAUDAOkc4PvAyjld7RqwRDf2BhjgQc2HznL+rFI4TJ5nkRTuBjuK vGnkVPU2UdwgB9y2U4ri0iFjRUhqLnYsGJZjeIAN6g==
X-Google-Smtp-Source: APXvYqxELIL6olDksXT+rEzc6zriKezI0obuSw8eegsqi1FvQfM6v98eAlWLZK7Sd4j/w1Ow2LKU0VRSqPQukG0Nxjg=
X-Received: by 2002:adf:e8ca:: with SMTP id k10mr20467930wrn.50.1580814721233; Tue, 04 Feb 2020 03:12:01 -0800 (PST)
MIME-Version: 1.0
References: <CAPOFeyhp5YE+Y2nSUfEwGUHamp19vL_XT1kJZ-krOm00i915Eg@mail.gmail.com> <CAKDhxQocLR9sotSRWFtM7Kup4zXk2dTP-bxehoYjxuJHFtXuRA@mail.gmail.com> <CAKcm_gNnsp1uWn5W7o5g_0ODfiqDk-1nAL7vPXUNHTf3wwN2DA@mail.gmail.com> <CALGR9oZjS0j8OcVaL7vSFKrJnC=iZyF=uhhY80S5GrhWpwzNiQ@mail.gmail.com> <CH2PR22MB2086773FDD645B90E5C98B43DA030@CH2PR22MB2086.namprd22.prod.outlook.com>
In-Reply-To: <CH2PR22MB2086773FDD645B90E5C98B43DA030@CH2PR22MB2086.namprd22.prod.outlook.com>
From: Ian Swett <ianswett@google.com>
Date: Tue, 04 Feb 2020 06:11:49 -0500
Message-ID: <CAKcm_gPxT4dEuTGS_npO60V6TcfjA=m7-so8CTE31G8c4X=nag@mail.gmail.com>
Subject: Re: [HTTP/3]Sending reserved frame before SETTINGS
To: Mike Bishop <mbishop@evequefou.be>
Cc: Lucas Pardue <lucaspardue.24.7@gmail.com>, IETF QUIC WG <quic@ietf.org>, Ryan Hamilton <ryan@optimism.cc>, Renjie Tang <renjietang@google.com>
Content-Type: multipart/alternative; boundary="000000000000ea9bdf059dbe1b69"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/nT7SA6BbiXJw3TderhBhXCLQMn0>
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: Tue, 04 Feb 2020 11:12:06 -0000

Thinking more, I don't think we're losing much with this restriction, so
I'm fine with it as is.

On Tue, Feb 4, 2020 at 4:44 AM Mike Bishop <mbishop@evequefou.be> wrote:

> Yes, this text was added to record our decision when this question came up
> before.  An unknown frame is not SETTINGS.  If you define something new
> (EXTENDED_SETTINGS_REBORN), you can very well mandate that it be the next
> frame *after* SETTINGS, but it is not a SETTINGS frame and doesn’t
> satisfy the expectation to see a SETTINGS frame there.
>
>
>
> *From:* QUIC <quic-bounces@ietf.org> *On Behalf Of * Lucas Pardue
> *Sent:* Sunday, February 2, 2020 12:34 PM
> *To:* Ian Swett <ianswett=40google.com@dmarc.ietf.org>
> *Cc:* IETF QUIC WG <quic@ietf.org>; Ryan Hamilton <ryan@optimism.cc>;
> Renjie Tang <renjietang=40google.com@dmarc.ietf.org>
> *Subject:* Re: [HTTP/3]Sending reserved frame before SETTINGS
>
>
>
> I think the design of this is ok as is.
>
>
>
> On Sat, 1 Feb 2020, 22:49 Ian Swett, <ianswett=40google.com@dmarc.ietf.org
> <40google.com@dmarc.ietf..org>> wrote:
>
> Thanks for bringing this up Renjie.  I agree the subsequent text seems to
> clarify the answer.
>
>
>
> However, is that the behavior we want, given it does limit extensibility
> in some small ways?
>
>
>
> On Sat, Feb 1, 2020 at 11:25 AM Ryan Hamilton <ryan@optimism.cc> wrote:
>
> Wow, interesting question!
>
>
>
> 6.2.1 requires the SETTINGS frame to be first on the control frame:
>
>
>
>    If the first frame of the control stream is any other frame
>
>    type, this MUST be treated as a connection error of type
>
>    H3_MISSING_SETTINGS.
>
>
>
> Whereas 7.2.9 says reserved frames have no semantic meaning:
>
>
>
>    Frame types of the format "0x1f * N + 0x21" for integer values of N
>
>    are reserved to exercise the requirement that unknown types be
>
>    ignored (Section 9 <https://tools.ietf.org/html/draft-ietf-quic-http-25#section-9>).  These frames have no semantics, and can be sent
>
>    on any open stream when application-layer padding is desired.
>
>
>
> This sounds like a conflict since something that has no semantics seems
> like it should not cause errors! However, looking Section 9 I think we find
> the resolution:
>
>    Implementations MUST ignore unknown or unsupported values in all
>
>    extensible protocol elements.  Implementations MUST discard frames
>
>    and unidirectional streams that have unknown or unsupported types.
>
>    This means that any of these extension points can be safely used by
>
>    extensions without prior arrangement or negotiation.  However, where
>
>    a known frame type is required to be in a specific location, such as
>
>    the SETTINGS frame as the first frame of the control stream (see
>
>    Section 6.2.1 <https://tools.ietf.org/html/draft-ietf-quic-http-25#section-6....2.1>), an unknown frame type does not satisfy that
>
>    requirement and SHOULD be treated as an error.
>
>
>
> So it seems that it's illegal to send a GREASED frame before the SETTINGS frame. Does that sound right to you?
>
>
>
> Cheers,
>
>
>
> Ryan
>
>
>
> On Fri, Jan 31, 2020 at 11:10 PM Renjie Tang <renjietang=
> 40google.com@dmarc.ietf.org> wrote:
>
> Hi all,
>
>
>
> When I was implementing greasing for HTTP/3 frames, I came across a
> potential confusion.
>
>
>
> Presumably, if a non-reserved unknown frame is received before SETTINGS on
> a control stream, the connection should be closed.
>
>
>
> But if a reserved frame is received before SETTINGS frame on a control
> stream, does it count as an error and close the connection? Or should
> it simply be ignored because it has no semantic meaning?
>
>
>
> Thanks!
>
> Renjie
>
>