Re: [core] A couple of late comments on Hop-Limit

Adam Roach <adam@nostrum.com> Wed, 16 October 2019 15:54 UTC

Return-Path: <adam@nostrum.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F338412022E for <core@ietfa.amsl.com>; Wed, 16 Oct 2019 08:54:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.279
X-Spam-Level:
X-Spam-Status: No, score=-1.279 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HTML_MESSAGE=0.001, KHOP_HELO_FCRDNS=0.4, T_SPF_HELO_PERMERROR=0.01, T_SPF_PERMERROR=0.01] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=nostrum.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 VA8D5UbYGNLn for <core@ietfa.amsl.com>; Wed, 16 Oct 2019 08:54:49 -0700 (PDT)
Received: from nostrum.com (raven-v6.nostrum.com [IPv6:2001:470:d:1130::1]) (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 51BE0120120 for <core@ietf.org>; Wed, 16 Oct 2019 08:54:49 -0700 (PDT)
Received: from Svantevit.local (99-152-146-228.lightspeed.dllstx.sbcglobal.net [99.152.146.228]) (authenticated bits=0) by nostrum.com (8.15.2/8.15.2) with ESMTPSA id x9GFsgkg030030 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 16 Oct 2019 10:54:43 -0500 (CDT) (envelope-from adam@nostrum.com)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nostrum.com; s=default; t=1571241283; bh=3dWyAErWoy4loGw0V3GCvq+G5ctTdAJJdwGJmQRAYsM=; h=Subject:To:References:From:Date:In-Reply-To; b=qwk2bDSqAob7Mb+Cuuz9H9Jv+dPiDpzYQTGfzhO7n40OQrTkkvh9T+DpxtDr6qAsL 0X8uDl/bYuwtqLr94i3HQZpTSjakFDfHtP95g7/GmgKsnrvYPCeZwTHtR/v/ifyOl4 bpGaq9Cn9oeXWHcQdm5ylng9dD5fbUekFHWUWPvU=
X-Authentication-Warning: raven.nostrum.com: Host 99-152-146-228.lightspeed.dllstx.sbcglobal.net [99.152.146.228] claimed to be Svantevit.local
To: Christer Holmberg <christer.holmberg@ericsson.com>, "core@ietf.org" <core@ietf.org>
References: <9D131FD6-2CE8-4C23-8BF1-0641C3E65A46@ericsson.com>
From: Adam Roach <adam@nostrum.com>
Message-ID: <bce0bd61-82dc-76e6-5750-60d086522a40@nostrum.com>
Date: Wed, 16 Oct 2019 10:54:35 -0500
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.9.0
MIME-Version: 1.0
In-Reply-To: <9D131FD6-2CE8-4C23-8BF1-0641C3E65A46@ericsson.com>
Content-Type: multipart/alternative; boundary="------------3BCE567C3848DC238B88E87D"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/UE9RclIXIoLsNH9pT_sVJtvpyn4>
Subject: Re: [core] A couple of late comments on Hop-Limit
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 16 Oct 2019 15:54:51 -0000

On 10/16/19 5:13 AM, Christer Holmberg wrote:
>
> Hi,
>
> I haven’t followed the hop-limit discussions, so I apologize if the 
> following has already been discussed. I also know that my comments 
> come very late in the process, so sorry for that.
>
> Adam may have an opinion regarding Q2.
>

I do!


> Q2:
>
> The draft says that a CoAP message with the Hop-Limit option value set 
> to 0 bigger than 255 must be rejected with a 4.00 Bad Request response.
>
>   * Is 4.00 really an appropriate response code? When reading the HTTP
>     definition for 400 Bad Request (CoAP inherits the semantics), it
>     is about a client error (miss formed message, etc), which is not
>     the case here.
>   * Based on my experience in SIP, it is VERY useful to have a
>     dedicated response code for this (SIP defines ‘483 Too Many
>     Hops’). Because, when this happens, it is often related to
>     **network configuration and/or routing issues** – not to client
>     implementation issues – so it is VERY useful information when
>     trying to figure out why the message was rejected.
>

So, keep in mind that properly-implemented instances of this 
specification will never try to put a zero on the wire: an 
implementation that receives a message with a Hop-Count of 1 that would 
otherwise forward it are required to forego such forwarding by the final 
paragraph of section 3. (The notion of "greater than 255" doesn't exist, 
since you can't communicate a value greater than 255 in an 8-bit 
unsigned field). This is generally going to trigger a TBA1 (probably 
5.08) response.

That means that a "Hop-Count" of zero is semantically nonsense, and 
arguably a malformed message. This is analogous to an HTTP proxy 
corrupting a message on the way to its destination such that it cannot 
be interpreted by the recipient, a situation that would also trigger a 
400 response.

All of which is to say that I think the 4.00 response to a Hop-Count of 
0 is the correct behavior.

/a