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

"Acee Lindem (acee)" <acee@cisco.com> Thu, 12 October 2017 17:15 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 C4178133032; Thu, 12 Oct 2017 10:15:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.52
X-Spam-Level:
X-Spam-Status: No, score=-14.52 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, URIBL_BLOCKED=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 82cnIUcCwRS2; Thu, 12 Oct 2017 10:15:36 -0700 (PDT)
Received: from alln-iport-6.cisco.com (alln-iport-6.cisco.com [173.37.142.93]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AD582132F8F; Thu, 12 Oct 2017 10:15:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=4332; q=dns/txt; s=iport; t=1507828535; x=1509038135; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=R7VUQJgD95cAs9PbUsNwKIjYd3ev1cQgzeMj37RlwKQ=; b=V5f4vmOZ/7ftS9rOK5KSJXut+Yh6EiklekdRUFLsKudN6WJN5U/AwVzK 9Fp6nubqJRcG33lRJiMoafU5GjCUm4rQwUuVM1wpZHRSf36vZ9UmwhQS0 FMzdtS38Sq8zi+iA+3UtiKwNCGJRG2B/9Hlmf9y5knWuZJwR2Lbkc/mGR M=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0CbAAALo99Z/5tdJa1eGQEBAQEBAQEBAQEBBwEBAQEBg11kbicHg3OKH48vgXaWL4ISCh+FHAIahCQ/GAECAQEBAQEBAWsohR4BBSMRRRACAQgYAgImAgICMBUQAgQBDQWKHqs8gieLOgEBAQEBAQEBAQEBAQEBAQEBAQEBARgFgQ6CH4IHhjA1hRyCfIJhBaFEAodcjQyCFIlyhwqVPgIRGQGBOAEfOIEOeBWGGIFOdopGgREBAQE
X-IronPort-AV: E=Sophos;i="5.43,367,1503360000"; d="scan'208";a="15644236"
Received: from rcdn-core-4.cisco.com ([173.37.93.155]) by alln-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Oct 2017 17:15:22 +0000
Received: from XCH-RTP-011.cisco.com (xch-rtp-011.cisco.com [64.101.220.151]) by rcdn-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id v9CHFLJr023450 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Thu, 12 Oct 2017 17:15:21 GMT
Received: from xch-rtp-015.cisco.com (64.101.220.155) by XCH-RTP-011.cisco.com (64.101.220.151) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Thu, 12 Oct 2017 13:15:21 -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; Thu, 12 Oct 2017 13:15:21 -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/0uFn8VfhB32jaLfaWWAgAE9hQD//85/gA==
Date: Thu, 12 Oct 2017 17:15:20 +0000
Message-ID: <D6051A44.CE6BA%acee@cisco.com>
References: <150776904011.16844.17501743592969348058.idtracker@ietfa.amsl.com> <D6043959.CE4D1%acee@cisco.com> <18af05f7-cdab-7c87-65d9-9b67f5464ca1@nostrum.com>
In-Reply-To: <18af05f7-cdab-7c87-65d9-9b67f5464ca1@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: <784B06C9B1AE0B41BC31AD85CD5C99F9@emea.cisco.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtgwg/_8GHAeBObS4wN_OVyCyhWDBNN5w>
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: Thu, 12 Oct 2017 17:15:38 -0000

Hi Adam, 

On 10/12/17, 12:12 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]

Yes - this doesn’t appear to be a complicate fix at all. We’re going to
get more eyes on it and do some tests with https://yangcatalog.org/yangre/
 but we should be able to fix this.

>
>____
>
>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))|'


Although this is a somewhat controversial subject, we used “[0-9]" for
portability for implementations using non-standard regular expression
parsers. 

Thanks,
Acee 

>
>
>/a