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

Ladislav Lhotka <lhotka@nic.cz> Wed, 18 January 2017 14:24 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 3F32112945A for <netmod@ietfa.amsl.com>; Wed, 18 Jan 2017 06:24:27 -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 1C3fV9kKVjYq for <netmod@ietfa.amsl.com>; Wed, 18 Jan 2017 06:24:25 -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 A8543129440 for <netmod@ietf.org>; Wed, 18 Jan 2017 06:24:24 -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 DA02C607AF; Wed, 18 Jan 2017 15:24:22 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1484749462; bh=6TMpkMHPzrvSZnec0xSRMRUzi5PisXOyUnkzKBoEwE8=; h=From:Date:To; b=WGJRnBSK0vEX4llcafLye7kLOTwCu8QEYgAWdazyLzxkn2h6DItyyR9SxVcDxvkvv Q6FPspdbCP1FO/Hnlw7bmSEzxXY+FjBNgAFGXrJV4fsidiFtigl0C+UM61e3ZX3FXz 5TbYF4pfSsnY9Cprp0Bf32bmJhkG/+tP2LYuAEEA=
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.145532.995038902796253716.mbj@tail-f.com>
Date: Wed, 18 Jan 2017 15:24:22 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <69B83F1A-1FBC-44E9-B499-054966616C11@nic.cz>
References: <20170118114858.62A63B80FFD@rfc-editor.org> <20170118.145532.995038902796253716.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/IzA0iCcypww-COaEP2aMRvT1s70>
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:24:27 -0000

> 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 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.

> 
> 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.

If this erratum is rejected, what is the basis for accepting erratum #4909 that started this discussion?

Lada

> 
> /martin

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