Re: [tsvwg] draft-ietf-udp-options issues from IETF 104

"C. M. Heard" <heard@pobox.com> Wed, 17 July 2019 17:25 UTC

Return-Path: <heard@pobox.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 519C9120867 for <tsvwg@ietfa.amsl.com>; Wed, 17 Jul 2019 10:25:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=pobox.com; domainkeys=pass (1024-bit key) header.from=heard@pobox.com header.d=pobox.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 oXcl-7mTLasl for <tsvwg@ietfa.amsl.com>; Wed, 17 Jul 2019 10:25:43 -0700 (PDT)
Received: from pb-smtp1.pobox.com (pb-smtp1.pobox.com [64.147.108.70]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AF6D312079D for <tsvwg@ietf.org>; Wed, 17 Jul 2019 10:25:35 -0700 (PDT)
Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id B0DBF151B87 for <tsvwg@ietf.org>; Wed, 17 Jul 2019 13:25:34 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=sasl; bh=FjT6xciqMnZT16b6KxsTr7NlfTo=; b=HQnlpU 1TYKQiAkAjAp8JwsS3emmhBZVH+6YV9wwjcym5ZcTA+vZuN8c3LAifBVK1yfphlj J8vTffOzhvwvzUWVt48c4Q63nszh6QstvET+yBmeKmkfjU/zd7ZneJiurUngUQ3k cmlQNFIherUxwEwrLJgqYyH3EwJziXDMcW9qI=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; q=dns; s=sasl; b=hAoymYdM4TQ3y5ZJNYznqAisckRQRfDE 7FMrXNZJyJzSa/m2cYJmBw1pL0RTA9ij/PicAupxI0Y+PO/wtnjT8iO9NB+iYIfQ cjFCkzRjJKpA8S+Up7/ylRLsFFuo6zkSal5pSKktHH6MF0rHNE/cM4bImr/k5z5t VmeRw5u01kU=
Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id A6428151B85 for <tsvwg@ietf.org>; Wed, 17 Jul 2019 13:25:33 -0400 (EDT)
Received: from mail-io1-f47.google.com (unknown [209.85.166.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 13309151B81 for <tsvwg@ietf.org>; Wed, 17 Jul 2019 13:25:33 -0400 (EDT)
Received: by mail-io1-f47.google.com with SMTP id m24so47043521ioo.2 for <tsvwg@ietf.org>; Wed, 17 Jul 2019 10:25:33 -0700 (PDT)
X-Gm-Message-State: APjAAAXYkepPWomdK7eV4goR8cDWJRzUAxvJF+0SlG2HPxqFYHAXvNhL Y+NhLmiOFWhVaFtb3gtiHCPm8yXee6dgjelNVYA=
X-Google-Smtp-Source: APXvYqzk7Aw1XUWWluOTZ3JR+n/Tt/DgGEO9DgU0Rdxspj0sDY7IuPVWgX7TLQP9Wd+m25Gg8lf/zAKifoF49VMdfug=
X-Received: by 2002:a5e:d51a:: with SMTP id e26mr31131929iom.71.1563384332584; Wed, 17 Jul 2019 10:25:32 -0700 (PDT)
MIME-Version: 1.0
References: <CAPDqMeq9GjEQKukH1pZOTdE50e_rc3U6gpdxT-5qrS5phD0RGw@mail.gmail.com> <646D45AD-D79B-4BD2-A084-7DA97CE2C415@strayalpha.com> <7EC37B50-45D5-4CF1-B113-205E55BF244E@strayalpha.com> <CALx6S34s7L7xo+26bt5Cdaqi4Es5Aci42GHk1WNKzugr5st-Gw@mail.gmail.com> <B525BF50-EFCC-44A5-A604-6CDDA914A1CB@strayalpha.com> <CAPDqMep3R6z9PRKkHyOvrh6sV9n5Sc0B++-zVz0FYJCwE6swrQ@mail.gmail.com> <E42A2AE2-F499-465E-BDE6-5EFC0AB20042@strayalpha.com> <CE03DB3D7B45C245BCA0D24327794936306138E9@MX307CL04.corp.emc.com> <CAPDqMeoyNb7vQTdqxLpZpnKb9S7QKeDJNLyQJBmq95yXhB+xfQ@mail.gmail.com> <7D365770-64FE-40BC-901D-B4D7DF6B484B@strayalpha.com> <20190713182554.GB39770@clarinet.employees.org> <CALx6S36mH2M6SYnRSecWXa7k_d1u8O43+CXE-=KqeO0x2e5+qw@mail.gmail.com> <82FF6486-FABF-4D2C-B5E2-178779C720A4@strayalpha.com> <30c17e9c174f6b0da3ecc6b503a8cb17@strayalpha.com> <CACL_3VGs7j+y5vFNT3OL9OKX8ue4rv-Cxi467KR-vbhnMdx86g@mail.gmail.com> <2f71a292f924a9b8de4227c4bbc2f809@strayalpha.com> <CACL_3VGrF5UnbVsSzZZoy1i57WKiQKBX2T3a16UyEVHY=Kr3XA@mail.gmail.com> <CE03DB3D7B45C245BCA0D243277949363061EF7A@MX307CL04.corp.emc.com> <CACL_3VE7+3WD3Uzubf8X9uQX9ZYPnZVhXjheUOuL9EfjT1JkGQ@mail.gmail.com> <CALx6S35V-d3Rn_wjrhbHUHgS=_+dVjR4hbMJ0-JBsG-1BuFuZg@mail.gmail.com>
In-Reply-To: <CALx6S35V-d3Rn_wjrhbHUHgS=_+dVjR4hbMJ0-JBsG-1BuFuZg@mail.gmail.com>
From: "C. M. Heard" <heard@pobox.com>
Date: Wed, 17 Jul 2019 10:25:20 -0700
X-Gmail-Original-Message-ID: <CACL_3VEDU_ueAS7L9K6Buz3Ft4CPZ+0iOzkMvAxEXJG_EEybaQ@mail.gmail.com>
Message-ID: <CACL_3VEDU_ueAS7L9K6Buz3Ft4CPZ+0iOzkMvAxEXJG_EEybaQ@mail.gmail.com>
To: Tom Herbert <tom@herbertland.com>
Cc: "Black, David" <David.Black@dell.com>, Joe Touch <touch@strayalpha.com>, tsvwg <tsvwg@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000ca916d058de3c7e5"
X-Pobox-Relay-ID: E1B872CA-A8B7-11E9-B220-46F8B7964D18-06080547!pb-smtp1.pobox.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/tsvwg/26zytlyeeHbXDnICb_e1PiO5Uj0>
Subject: Re: [tsvwg] draft-ietf-udp-options issues from IETF 104
X-BeenThere: tsvwg@ietf.org
X-Mailman-Version: 2.1.29
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: Wed, 17 Jul 2019 17:25:45 -0000

On Tue, Jul 16, 2019 at 6:13 PM Tom Herbert wrote:
> On Tue, Jul 16, 2019 at 5:43 PM C. M. Heard wrote:
> > What I intended to say might be more accurately expressed by saying
> > that the default receive behavior is:
> >
> > - If UDP CS != 0, perform the UDP checksum validation and discard the
> >   entire packet if the validation fails. In addition, if a surplus area
> >   is present, perform the OCS validation, and discard the surplus area
> >   if the validation fails.
> >
> > - If UDP CS == 0, do not perform either of those checks. Accept or
> >   discard the UDP datagram and its surplus area depending on whether
> >   UDP CS == 0 is or is not allowed for the socket in question.
> >
> > Implementations MAY, but need not, support the following configuration
> > options: (a) disable checking of OCS when UDP CS != 0 and (b) enable
> > checking of OCS when UDP CS == 0.
>
> Mike,
>
> UDP options should not need to change the specified behavior of UDP
> checksum.

I don't think that the words above say that; in any case, I certainly didn't
intend to suggest that. What I did intend to say was the opposite, i.e.,
that the presence or absence of the UDP check should affect how the option
checksum is handled.

> In IPv4, if the checksum is zero, the packet is accepted.

RFC 1122 allows the application to control that behavior:

            If a UDP datagram is received with a checksum that is non-
            zero and invalid, UDP MUST silently discard the datagram.
            An application MAY optionally be able to control whether UDP
            datagrams without checksums should be discarded or passed to
            the application.


My assumption was that would imply a per-socket option.

> In IPv6, if the checksum is zero then the packet is dropped with the
> narrow exception that that a tunneling protocol is used and the port
> is explictly configured to allow zero checksums. That's what the specs
> say and that's what's currently implemented.

The text was intended to allow (not require) exactly that.

> Also, if you say "is or is not allowed for the socket in question"
> that implies that we have to perform a socket lookup in the fast path
> just to decide whether to basic packet verification. That's not cheap
> and some devices performing the checksum verification might not even
> have a way to configure this. It's much better just be deterministic
> without needing state or configuration and verify the packet solely
> based on its contents and what the protocol specification says to do.

Should I have used the word "port" rather than "socket"? The assumption
I made is that in IPv6 the application would do the explicit configuration
to allow UDP CS=0 datagrams through the (socket) API.

In any case, it would be best to phrase this in terms of actual behavior
(as RFC 1122 does) instead of in terms of a particular API.

Mike