Re: Adam Roach's No Objection on draft-ietf-rtgwg-routing-types-16: (with COMMENT)

"Acee Lindem (acee)" <acee@cisco.com> Fri, 13 October 2017 19:36 UTC

Return-Path: <acee@cisco.com>
X-Original-To: rtgwg@ietfa.amsl.com
Delivered-To: rtgwg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 36DC0132396; Fri, 13 Oct 2017 12:36:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.521
X-Spam-Level:
X-Spam-Status: No, score=-14.521 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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.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 5EB1AoxiDxDv; Fri, 13 Oct 2017 12:36:12 -0700 (PDT)
Received: from rcdn-iport-3.cisco.com (rcdn-iport-3.cisco.com [173.37.86.74]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 08A7F126BF3; Fri, 13 Oct 2017 12:36:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3950; q=dns/txt; s=iport; t=1507923372; x=1509132972; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=VyXd3P6ofCxLZvt9h8RrpUmH7l0RHn3A+9Ih4AHPzsE=; b=AUxgkWocXLAQto3RLFlc0x5S8nKb8VW5rxTY+1+QPWVsAP9VQoE2Z+jt EGJ6n8EaeZzO09m5S2uwkkzCR8CR/IXo9afA6hslNqbC+h20/gZM5F9uc Umg843r637K67ZWN2emLLJ/e6wMTk67H2oOO64I5JsohbrRQLH+aPs/fv E=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AOAgC/FOFZ/5pdJa1dGQEBAQEBAQEBAQEBBwEBAQEBg1+BUicHg3OZUYF2li+CFAqFOwIahDxBFgECAQEBAQEBAWsohR4BBSMRRRACAQgYAgImAgICMBUQAgQBDQWKHawUgieLNAEBAQEBAQEBAQEBAQEBAQEBAQEBAR2BDoIfggeGMDWFBReCfIJhBaFGApRpghSJdIcKlUICERkBgTgBJgongVl6FYMtgxGBTnaJX4ERAQEB
X-IronPort-AV: E=Sophos;i="5.43,372,1503360000"; d="scan'208";a="297184109"
Received: from rcdn-core-3.cisco.com ([173.37.93.154]) by rcdn-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Oct 2017 19:36:11 +0000
Received: from XCH-RTP-013.cisco.com (xch-rtp-013.cisco.com [64.101.220.153]) by rcdn-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id v9DJa7qh003820 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Fri, 13 Oct 2017 19:36:10 GMT
Received: from xch-rtp-015.cisco.com (64.101.220.155) by XCH-RTP-013.cisco.com (64.101.220.153) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Fri, 13 Oct 2017 15:36:06 -0400
Received: from xch-rtp-015.cisco.com ([64.101.220.155]) by XCH-RTP-015.cisco.com ([64.101.220.155]) with mapi id 15.00.1320.000; Fri, 13 Oct 2017 15:36:06 -0400
From: "Acee Lindem (acee)" <acee@cisco.com>
To: Adam Roach <adam@nostrum.com>, The IESG <iesg@ietf.org>
CC: "draft-ietf-rtgwg-routing-types@ietf.org" <draft-ietf-rtgwg-routing-types@ietf.org>, "rtgwg-chairs@ietf.org" <rtgwg-chairs@ietf.org>, Jeff Tantsura <jefftant.ietf@gmail.com>, "rtgwg@ietf.org" <rtgwg@ietf.org>
Subject: Re: Adam Roach's No Objection on draft-ietf-rtgwg-routing-types-16: (with COMMENT)
Thread-Topic: Adam Roach's No Objection on draft-ietf-rtgwg-routing-types-16: (with COMMENT)
Thread-Index: AQHTQvM0YzmbInxn/0uFn8VfhB32jQ==
Date: Fri, 13 Oct 2017 19:36:06 +0000
Message-ID: <D6068DA4.CEAE9%acee@cisco.com>
References: <150776904011.16844.17501743592969348058.idtracker@ietfa.amsl.com> <D6043959.CE4D1%acee@cisco.com> <2a258e4e-eea6-2ac7-2237-7277b38e1d83@nostrum.com>
In-Reply-To: <2a258e4e-eea6-2ac7-2237-7277b38e1d83@nostrum.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.116.152.195]
Content-Type: text/plain; charset="utf-8"
Content-ID: <0354231C9C6806419E0C08877BEEBAB9@emea.cisco.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtgwg/xsZyWgIkKsdP9SXgw_3YZ2ZwINQ>
X-BeenThere: rtgwg@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Routing Area Working Group <rtgwg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtgwg>, <mailto:rtgwg-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rtgwg/>
List-Post: <mailto:rtgwg@ietf.org>
List-Help: <mailto:rtgwg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtgwg>, <mailto:rtgwg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Oct 2017 19:36:14 -0000

Hi Adam, 
I have incorporated your suggested pattern improvements in the -17
version. 
Thanks,
Acee

On 10/12/17, 12:13 PM, "Adam Roach" <adam@nostrum.com> wrote:

>On 10/11/17 20:16, Acee Lindem (acee) wrote:
>>
>>> ____
>>>
>>> There are several patterns in the YANG definition that perform
>>>significant
>>> restriction of numbers (e.g., to ensure they don't fall outside the
>>>range
>>> that
>>> can be stored in 16 or 32 bits). In many cases, these patterns include
>>>the
>>> ability to zero-prefix some (but not all) decimal values. For example,
>>>the
>>> production for route-origin would allow leading zeros in "2:0100:0555"
>>> but not
>>> in "2:04294967295:065535" (even though "2:4294967295:65535" is okay). I
>>> don't
>>> know offhand whether it makes sense to allow leading zeros in these
>>> fields, but
>>> I would argue that the production should be consistent in allowing or
>>> disallowing them. This issue arises in various forms in route-target,
>>> ipv6-route-target, route-origin, and ipv6-route-origin.
>> We’ll look at this and get back to you - a lot of time has already gone
>> into formulating and testing these patterns.
>
>
>Yes, and it would be a shame if that work resulted in publishing
>patterns with known issues.
>
>This flaw arises in three formulations (each of which appear multiple
>times), and would be quite easy to fix. These fixes should be obvious by
>inspection.
>
>32 bits (0-4,294,967,295)
>   Replace: [0-3]?[0-9]{0,8}[0-9]
>   With:    [1-3][0-9]{9}|[1-9][0-9]{0,8}|0
>
>16 bits (0-65535)
>   Replace: [0-5]?[0-9]{0,3}[0-9]
>   With:    [1-5][0-9]{4}|[1-9][0-9]{0,3}|0
>
>8 bits (0-255)
>   Replace: [01]?[0-9]?[0-9]
>   With:    1[0-9]{2}|[1-9]?[0-9]
>
>____
>
>As an aside: replacing "[0-9]" with "\d" everywhere would make these
>patterns easier to read in general, but this is merely a readability
>improvement rather than a bug fix. Compare:
>
>          + '(2:(429496729[0-5]|42949672[0-8][0-9]|'
>          +     '4294967[01][0-9]{2}|'
>          +     '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
>          +     '4294[0-8][0-9]{5}|'
>          + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
>          +     '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):'
>          +     '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
>          +     '6[0-4][0-9]{3}|'
>          +     '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
>
>Becomes:
>
>          + '(2:(429496729[0-5]|42949672[0-8]\d|'
>          +     '4294967[01]\d{2}|'
>          +     '429496[0-6]\d{3}|42949[0-5]\d{4}|'
>          +     '4294[0-8]\d{5}|'
>          +     '429[0-3]\d{6}|42[0-8]\d{7}|4[01]\d{8}|'
>          +     '[1-3]\d{9}|[1-9]\d{0,8}|0):'
>          +     '(6553[0-5]|655[0-2]\d|65[0-4]\d{2}|'
>          +     '6[0-4]\d{3}|'
>          +     '[1-5]\d{4}|[1-9]\d{0,3}|0))|'
>
>
>/a