Re: [netmod] 6021 ipv4-prefix

Ladislav Lhotka <lhotka@nic.cz> Fri, 03 May 2019 08:23 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 4C3171200C4 for <netmod@ietfa.amsl.com>; Fri, 3 May 2019 01:23:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
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 JSKATq8iv-vm for <netmod@ietfa.amsl.com>; Fri, 3 May 2019 01:23:11 -0700 (PDT)
Received: from trail.lhotka.name (trail.lhotka.name [77.48.224.143]) by ietfa.amsl.com (Postfix) with ESMTP id 3F5EC12004D for <netmod@ietf.org>; Fri, 3 May 2019 01:23:11 -0700 (PDT)
Received: by trail.lhotka.name (Postfix, from userid 109) id 8DD26182044A; Fri, 3 May 2019 10:22:43 +0200 (CEST)
Received: from localhost (nat-1.nic.cz [217.31.205.1]) by trail.lhotka.name (Postfix) with ESMTPSA id 4AABE1820045; Fri, 3 May 2019 10:22:40 +0200 (CEST)
From: Ladislav Lhotka <lhotka@nic.cz>
To: "Rob Wilton \(rwilton\)" <rwilton@cisco.com>, Mikael Abrahamsson <swmike@swm.pp.se>, Randy Presuhn <randy_presuhn@alumni.stanford.edu>
Cc: "netmod\@ietf.org" <netmod@ietf.org>
In-Reply-To: <76a384e8d3f7487e865e7dd6ad0e4c4f@XCH-RCD-007.cisco.com>
References: <0c4265d31adbf208a680f76216cc4bc42c766eae.camel@nic.cz> <959ed1a8092f4798ac0b923384962049@XCH-RCD-007.cisco.com> <20190429153643.oxfcq7ze6ttdihb4@anna.jacobs.jacobs-university.de> <alpine.DEB.2.20.1904300713100.3490@uplift.swm.pp.se> <20190430061737.vvxghxyacd57k73i@anna.jacobs.jacobs-university.de> <alpine.DEB.2.20.1904301038570.3490@uplift.swm.pp.se> <20190430090905.qsa3r4dwauilsxur@anna.jacobs.jacobs-university.de> <alpine.DEB.2.20.1905011051160.1824@uplift.swm.pp.se> <20190501111712.347bpz26br6ox3jp@anna.jacobs.jacobs-university.de> <alpine.DEB.2.20.1905011456580.1824@uplift.swm.pp.se> <20190501155321.v4qz6twsom45y62f@anna.jacobs.jacobs-university.de> <alpine.DEB.2.20.1905012137310.1824@uplift.swm.pp.se> <5CCA58DA.3030801@alumni.stanford.edu> <alpine.DEB.2.20.1905021330140.1824@uplift.swm.pp.se> <87v9yt58vi.fsf@nic.cz> <76a384e8d3f7487e865e7dd6ad0e4c4f@XCH-RCD-007.cisco.com>
Mail-Followup-To: "Rob Wilton \(rwilton\)" <rwilton@cisco.com>, Mikael Abrahamsson <swmike@swm.pp.se>, Randy Presuhn <randy_presuhn@alumni.stanford.edu>, "netmod\@ietf.org" <netmod@ietf.org>
Date: Fri, 03 May 2019 10:23:01 +0200
Message-ID: <87pnp0q74q.fsf@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/giNP49odNRUP-FXIs1xULG2S5gI>
Subject: Re: [netmod] 6021 ipv4-prefix
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
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: Fri, 03 May 2019 08:23:13 -0000

"Rob Wilton (rwilton)" <rwilton@cisco.com> writes:

>> -----Original Message-----
>> From: netmod <netmod-bounces@ietf.org> On Behalf Of Ladislav Lhotka
>> Sent: 02 May 2019 13:39
>> To: Mikael Abrahamsson <swmike@swm.pp.se>se>; Randy Presuhn
>> <randy_presuhn@alumni.stanford.edu>
>> Cc: netmod@ietf.org
>> Subject: Re: [netmod] 6021 ipv4-prefix
>> 
>> Mikael Abrahamsson <swmike@swm.pp.se> writes:
>> 
>> > On Wed, 1 May 2019, Randy Presuhn wrote:
>> >
>> >> Hi -
>> >>
>> >> On 5/1/2019 12:46 PM, Mikael Abrahamsson wrote:
>> >> ....
>> >>> Where is the text that tells the server implementor whether to throw
>> >>> an error when client commits non-zero bits, or to just throw the
>> >>> bits away and store the value in the canonical format?
>> >>
>> >> Such text would be an inappropriate constraint the server's internal
>> >> representation.  We should only specify the externally-visible
>> >> behaviour: that the reported value will be in the canonical format.
>> >> Whether an implementation preserves extraneous cruft in its internal
>> >> representation is purely an implementation decision, and not subject
>> >> to standardization.
>> >
>> > I am talking about what goes on the wire. If the client does an
>> > edit-config with ipv6-prefix 2001:db8::1/64, should the server convert
>> > this into 2001:db8::/64 or throw an error on the edit-config operation.
>> >
>> > Jurgen seems to say it should convert it and not throw an error, and
>> > I'd like text to say that indeed, this is proper behaviour. Nobody has
>> > so far been able to tell me where this text currently is, so that's
>> > why I'm
>> 
>> If we agree that a type defines the set of legal on-the-wire values (possibly
>> modulo representation - JSON/XML/...), then section 4.2.2.1 in RFC 7950 says:
>> 
>> [A leaf instance] has exactly one value of a particular type ...
>> 
>> So why should a server throw an error if this is satisfied?
>
> I don't think that there is text for a derived type that defines a canonical representation that:
> (i) The server must internally treat the data as if it were in the canonical form
> (ii) If the data is returned then it must be in the canonical form.

The text is in subsection 9.1, which really should have been outside
sec. 9 (Built-In Types), and applicable to derived types as well. 

But anyway, Mikael wrote about the case when the client sends a value
(specifically, belonging to the ipv6-prefix type) that is NOT in the
canonical format.

Lada

>
> We should fix this in YANG 1.2 so this is clearer, but YANG 1.2 isn't going to be here for a while.  I don't think that we can do this as an erratum, but perhaps the 6991bis could, for each type state that the it is handled equivalently to RFC 7950 section 9.1.  Or would that just end up being noise?
>
> Thanks,
> Rob
>

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