Re: [netmod] [Technical Errata Reported] RFC6020 (4911)

Ladislav Lhotka <lhotka@nic.cz> Wed, 18 January 2017 14:58 UTC

Return-Path: <lhotka@nic.cz>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 617CC129461 for <netmod@ietfa.amsl.com>; Wed, 18 Jan 2017 06:58:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.199
X-Spam-Level:
X-Spam-Status: No, score=-10.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-3.199] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 7_AkHV-aAzwo for <netmod@ietfa.amsl.com>; Wed, 18 Jan 2017 06:58:11 -0800 (PST)
Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2D99312943B for <netmod@ietf.org>; Wed, 18 Jan 2017 06:58:11 -0800 (PST)
Received: from [IPv6:2001:718:1a02:1:ded:9860:a06f:ffc4] (unknown [IPv6:2001:718:1a02:1:ded:9860:a06f:ffc4]) by mail.nic.cz (Postfix) with ESMTPSA id C90D360932; Wed, 18 Jan 2017 15:58:09 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1484751489; bh=Mpuqa0m0yfHa4fqL78IMux1pwZI2VXsSSCvBq6MPHfo=; h=From:Date:To; b=kE9w1ByPJ3h7UbAOzJv6989Zl6tvIlsT8adjQf2lWzqQxno1Lg4z6W/pNFUwbzDzb JCxHu6TbGhh9bRYzQp/zd1lE+3nCJwETLDh5nWGOeinL+jSwkxNH6haHlmUSOGs+HD 5zSEk3LVWXzdEqGoxuSPa1+e9kE9poJjCXrE9+S8=
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\))
From: Ladislav Lhotka <lhotka@nic.cz>
In-Reply-To: <20170118.154412.1767958997070783224.mbj@tail-f.com>
Date: Wed, 18 Jan 2017 15:58:09 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <A7E79BBF-DEB1-474B-9E1B-65539DD42553@nic.cz>
References: <20170118114858.62A63B80FFD@rfc-editor.org> <20170118.145532.995038902796253716.mbj@tail-f.com> <69B83F1A-1FBC-44E9-B499-054966616C11@nic.cz> <20170118.154412.1767958997070783224.mbj@tail-f.com>
To: Martin Björklund <mbj@tail-f.com>
X-Mailer: Apple Mail (2.3259)
X-Virus-Scanned: clamav-milter 0.99.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/uu7fZHelOOL71V2XT3j2N8zjuc0>
Cc: netmod@ietf.org, joel jaeggli <joelja@bogus.com>, RFC Editor <rfc-editor@rfc-editor.org>
Subject: Re: [netmod] [Technical Errata Reported] RFC6020 (4911)
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Jan 2017 14:58:13 -0000

> On 18 Jan 2017, at 15:44, Martin Bjorklund <mbj@tail-f.com> wrote:
> 
> Ladislav Lhotka <lhotka@nic.cz> wrote:
>> 
>>> On 18 Jan 2017, at 14:55, Martin Bjorklund <mbj@tail-f.com> wrote:
>>> 
>>> RFC Errata System <rfc-editor@rfc-editor.org> wrote:
>>>> The following errata report has been submitted for RFC6020,
>>>> "YANG - A Data Modeling Language for the Network Configuration
>>>> Protocol (NETCONF)".
>>>> 
>>>> --------------------------------------
>>>> You may review the report below and at:
>>>> http://www.rfc-editor.org/errata_search.php?rfc=6020&eid=4911
>>>> 
>>>> --------------------------------------
>>>> Type: Technical
>>>> Reported by: Ladislav Lhotka <lhotka@nic.cz>
>>>> 
>>>> Section: 6.1.3
>>>> 
>>>> Original Text
>>>> -------------
>>>> Within a double-quoted string (enclosed within " "), a backslash
>>>> character introduces a special character, which depends on the
>>>> character that immediately follows the backslash:
>>>> 
>>>> \n      new line
>>>> \t      a tab character
>>>> \"      a double quote
>>>> \      a single backslash
>>>> 
>>>> 
>>>> Corrected Text
>>>> --------------
>>>> Within a double-quoted string (enclosed within " "), a backslash
>>>> character introduces a special character, which depends on the
>>>> character that immediately follows the backslash:
>>>> 
>>>> \n      new line
>>>> \t      a tab character
>>>> \"      a double quote
>>>> \      a single backslash
>>>> 
>>>> The backslash MUST NOT be followed by any other character.
>>>> 
>>>> Notes
>>>> -----
>>>> The text doesn't state whether other characters may follow the
>>>> backslash, and if yes, what it means. Existing implementations have
>>>> used three approaches:
>>>> 
>>>> 1. report an error if another character follows the backslash
>>>> 2. keep only the character following the backslash, i.e., for example,
>>>> "\x" is the same as "x".
>>>> 3. keep both the backslash and the character following it.
>>>> 
>>>> This ambiguity is undesirable and YANG 1.1 [RFC 7950] explicitly
>>>> adopted option #1. However, many modules are still being written using
>>>> YANG version 1.0, so it is important to clarify this issue in RFC 6020
>>>> as well.
>>> 
>>> I don't think this errata should be accepted.  As stated, the spec is
>>> unclear, and YANG 1.1 has fixed this problem.  But it is not clear
>>> that the original intention when RFC 6020 was written was #1.
>>> Accepting this errata now would make existing implementations and
>>> modules invalid.
>> 
>> The problem is that the spec is clearly ambiguous
> 
> Agreed.

Then isn't it an error that needs to be corrected?

> 
>> and it is
>> impossible to decide whether such a module is valid or not and, if
>> it is, what the other backslash-escaped characters mean. Existing
>> implementations can already reject such modules - the fact that
>> pyang (and probably other tail-f tools) adopted one interpretation
>> doesn't mean that everybody does the same. 
> 
> This is exactly my point.

But it means that different tools may give different results, e.g. when matching a string against such a pattern.

> 
>>> The solution moving forward is to use YANG 1.1.
>>> 
>> 
>> YANG 1.0 modules continue to be written, and I think it is important
>> to stop this problem from spreading further. I think tools should
>> at least issue a warning because otherwise future upgrades to YANG
>> 1.1 may become a nightmare - modules will suddenly break in
>> unexpected places.
> 
> Sure, but that's a different story (I already added a warning for this
> in pyang).
> 
>> If this erratum is rejected, what is the basis for accepting erratum
>> #4909 that started this discussion?
> 
> That module relied on one interpretation, but as you write, the spec
> is unclear and toold behave differently.  Thus, modules should avoid
> this pattern.
> 

It might suffice to just warn readers of RFC 6020 that this issue exists and should be avoided by using single quotes. Unfortunately, RFC errata only seem to support explicit "patches" to the text but not such comments.

Lada

> 
> /martin

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67