Re: [tsvwg] Review of draft-ietf-tsvwg-udp-options-32

Martin Duke <martin.h.duke@gmail.com> Fri, 05 April 2024 21:39 UTC

Return-Path: <martin.h.duke@gmail.com>
X-Original-To: tsvwg@ietfa.amsl.com
Delivered-To: tsvwg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E8E9CC14F6F7; Fri, 5 Apr 2024 14:39:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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] 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 b48Vq4cVDfe4; Fri, 5 Apr 2024 14:39:48 -0700 (PDT)
Received: from mail-vk1-xa2a.google.com (mail-vk1-xa2a.google.com [IPv6:2607:f8b0:4864:20::a2a]) (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 3B2A0C14F6A0; Fri, 5 Apr 2024 14:39:48 -0700 (PDT)
Received: by mail-vk1-xa2a.google.com with SMTP id 71dfb90a1353d-4dabbd69c71so343844e0c.1; Fri, 05 Apr 2024 14:39:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712353187; x=1712957987; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fTw/QS4demAhGDC8H7mgwmvHXMO9f42TcKjxCtzdQLM=; b=BnRcY4xbAulKFbeuWwFfvHMnyomjXJEdmmQ9+mDmmvCSJRgdMc1vANGeNlDVGjS9KQ GZiRylr4csNywlpYW/ydc3Yw+Tbe40ej0s9FH56tJqqYwi5nsuNSPBQBr+RKIdMILNtz BtxUFw4DVneRaLmnYCE/mzqw13qgalGIOFT+0zYFdglvw7Y4bAdj7ifsnWiR9cjXrcEC 0o9IIyXuu3yYvVk8EYDEBa2xXd9v0/xWoxgP2DPzmcmK1e6/U2F27bDcNOpSYtBa9kK7 plSzOnXN6CdJgD59L4kI4F806ZLyvzXJWd1ULwhnRCNFfffB9R8tNtJC86KtV7/YTCwg tQbA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712353187; x=1712957987; 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=fTw/QS4demAhGDC8H7mgwmvHXMO9f42TcKjxCtzdQLM=; b=V/By/lS+/J5VpV9qqAfrfvvOSYZpYr/DXsWo4G8grDKdzOIOoloHxU30StTSd3G16Y M93rp36N4h2IkK2HhM9rRoL+04Tn61JkVrCtEmYDYk6Gwat4GveBeaNXHBTeAENywFyZ ptJ5XOah3OoK4kTfUXN2lJwOybK8sJW+tYNdk+B8DsVR9VNOp9MXAgbN5WreMZQEjKac Q1/Uu4i8nQuC6ZwyaSa55MZol7iFEkD2+G+YdoJZk023Fjd8BYBEDaikdbrNlbXUGFDF UNZRUO/ao1v9WzEKgDigC7sHTMqGWWSuTXZrEL9u1hiIwjgS+fs1KFZjjxEQLfOYxM6J xJGg==
X-Forwarded-Encrypted: i=1; AJvYcCU3yUiBOVevjzaEjWuHrDgv6aqtg1E3U6ADyZNZnwJcupFQvJ7Fj5W2smx4oUjOsau4ORw7fYTuNcblzHuPPOD3Iqrj5IbPxV/mREghBNDvYQtSCHlx7qMWXw==
X-Gm-Message-State: AOJu0YwxGw4s4c6jaY2ZePPI6Jb5FBYaGCmLNSkFSwJqWYCSYzVMi9vx 2H1Zl7Mi/Qgtierg+CGrXvYYSIOUN+1FoRWKV9oCZkNJVJjwY8eRNB8zMBzLxEyLoumkFsojTVe qSJSUeKyMtPppjoc0qllFRXvPZmw=
X-Google-Smtp-Source: AGHT+IF+5pysSWtThEjRMQDuTNAMopYKqsrD8WCl1GT7KFRlXMnNcrnlVR6dUHqIdmqDKlOTwcjtYT8hYodogC+9ySU=
X-Received: by 2002:ac5:cd87:0:b0:4d3:34b1:7211 with SMTP id i7-20020ac5cd87000000b004d334b17211mr2942319vka.3.1712353186886; Fri, 05 Apr 2024 14:39:46 -0700 (PDT)
MIME-Version: 1.0
References: <CAM4esxSpwRF5E3Xc_hotgvCSdKVe4BY_zRUKAzHvW48JEtWqTA@mail.gmail.com> <CACL_3VGOLkJU1m7pqSXRRouCKwdQ6yrbmaPwoa22Jr-N3FZNzA@mail.gmail.com> <CAM4esxSY6uTrE=ta2_rWwvDNmiocu_MVGArvCkecwWwmX4wLjg@mail.gmail.com> <CACL_3VFzh9MkROtm21gUtYF5Y1R+fa5_wdQi8TAT+Hp_-=0juw@mail.gmail.com>
In-Reply-To: <CACL_3VFzh9MkROtm21gUtYF5Y1R+fa5_wdQi8TAT+Hp_-=0juw@mail.gmail.com>
From: Martin Duke <martin.h.duke@gmail.com>
Date: Fri, 05 Apr 2024 14:39:33 -0700
Message-ID: <CAM4esxQpeo_q-NJSTeKT_usNezXq==gsUe1xgN69B=RHD-NrWw@mail.gmail.com>
To: "C. M. Heard" <heard@pobox.com>
Cc: tsvwg <tsvwg@ietf.org>, draft-ietf-tsvwg-udp-options.all@ietf.org
Content-Type: multipart/alternative; boundary="0000000000006f3b8b0615604b0a"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tsvwg/wIEMRWA6RqHRhsKDLB1OoU1SPV8>
Subject: Re: [tsvwg] Review of draft-ietf-tsvwg-udp-options-32
X-BeenThere: tsvwg@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Transport Area Working Group <tsvwg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tsvwg/>
List-Post: <mailto:tsvwg@ietf.org>
List-Help: <mailto:tsvwg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Apr 2024 21:39:49 -0000

OK, I get it now. Reassembled fragments always have UDP CS == 0. Thanks.

I think we've converged on most points.  A couple of things I'm asking the
authors to think about and can live with the result, and maybe we need to
talk more about token generation?

On Fri, Apr 5, 2024 at 11:37 AM C. M. Heard <heard@pobox.com> wrote:

> On Fri, Apr 5, 2024 at 9:49 AM Martin Duke wrote:
>
>> On Thu, Apr 4, 2024 at 2:22 PM C. M. Heard wrote:
>>
>>> (11.4) What if Frag. Start is inconsistent with the location of EOL?
>>>>
>>>
>>> Do you mean when Frag. Start points past the end of the packet? It was
>>> clear enough to me that this would be considered malformed and discarded,
>>> but maybe that's just me being too familiar with the intent, and not
>>> actually scrutinizing the text.
>>>
>>
>> "End of the packet" is a pretty ambiguous phrasing at this point :-).
>> What I mean is, what if the datagram contains zero payload, a FRAG option,
>> a series of other options, EOL, some random bytes, and then the frag start?
>> Is that legal? I gathered that the intent would be that Frag Start was
>> immediately after EOL, but then there are alignment issues, etc. What's
>> legal and what's malformed?
>>
>
>
> Sorry, I misunderstood. I see that the language in Section 11.1 (which
> defines EOL) should have some wordsmithing to change the words "the surplus
> area" to something like "the surplus area or the options area in a UDP
> fragment". With that change, there should be no problem with EOL at an
> offset before Frag. Start. It just means that the bytes after EOL and
> before the byte pointed to by Frag. Start are ignored (cf. how EOL works in
> IPv4 and TCP options). And those bytes should not be random, they should be
> zero (though the implementation has no obligation to check that).
>
> This is a good example why it's good to get people who have not read the
> spec to have a look. Those of us who have been around it for a long time
> have a tendency to see what we are sure it means instead of what it
> actually says 😑
>
>
> (11.4) "the OCS value of the original packet SHOULD be zero if each
>>>> fragment will have a non-zero OCS value"
>>>>
>>>> I don't understand the purpose of this. First, it complicates packet
>>>> processing because the full datagram has to use a different OCS
>>>> verification path if it's reassembled. Second, if the fragment OCSes are
>>>> sufficient, why not simply say that the original packet MUST NOT have an
>>>> OCS option?
>>>>
>>>
>>> Actually, the idea was that reassembly could be implemented as a "bump
>>> in the stack" and that the handling of reassembled datagrams would not vary
>>> much from how it's done for datagrams that are not received as fragments.
>>> IPv4 (and under certain circumstances IPv6) allow zero UDP checksum. The
>>> OCS is mandatory when UDP checksum is non-zero and recommended (but not
>>> required) when the UDP checksum is non-zero. So an implementation already
>>> has to deal with datagrams that have UDP CS == 0 but OCS != 0. Given that,
>>> it seems (to me at least) fair to keep this as a SHOULD, as it does not
>>> require any mechanisms that are not otherwise required.
>>>
>>
>> I'm concerned about the opposite: if UDP CS != 0, then the normal
>> processing path is to expect OCS != 0, but the recommendation in (11.4)
>> means that OCS will be zero! So there's a special path if the packet is
>> reassembled. Am I mixing this up?
>>
>
>
> There is no different path for reassembled packets as compared with those
> that are transmitted without UDP fragmentation.
>
> I think the confusion arises because there is no provision to transmit a
> separate UDP checksum covering the UDP header and UDP payload of the
> original packet (where "original" means prior to fragmentation or after
> reassembly). So the recommendation in Section 11.4 is to set that field to
> zero. What emerges from a "bump in the stack" implementation of UDP
> fragmentation is a packet that has UDP CS == 0 and OCS equal to whatever
> was received (which would be whatever was transmitted, in the absence of
> errors). These cases (UDP CS == 0 with OCS either non-zero, which must be
> checked, or zero, which means it's not present) already have to be handled
> for an unfragmented packet. Hence no new processing path.
>
> For fragments the usual rule applies, i.e., if UDP CS != 0 then OCS must
> be non-zero; if UDP CS == 0 then OCS may or may not be zero. When each
> fragment's UDP checksum is non-zero, then every fragment (and thus the
> reassembled payload and surplus area) must be covered by the OCS of the
> fragments, so the entire reassembled packet is protected by a checksum (and
> so there is no need for a UDP checksum for the original packet). What the
> draft recommends is that in this case OCS be set to zero in the original
> packet since it does not provide significant additional protection. The
> suggestion that "the original packet MUST NOT have an OCS option" in this
> case would cause an additional processing path, since OCS is actually a
> fixed field, and the way we indicate that it is omitted is to set it to
> zero.
>
> If this is not sufficiently clear, please let me know, and I'll take
> another stab at it.
>
> Mike Heard
>