[netmod] Unintended when-expression semantics in many IETF YANG modules

"Jan Lindblad (jlindbla)" <jlindbla@cisco.com> Thu, 09 June 2022 08:54 UTC

Return-Path: <jlindbla@cisco.com>
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 2AF81C15AAC4 for <netmod@ietfa.amsl.com>; Thu, 9 Jun 2022 01:54:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.607
X-Spam-Level:
X-Spam-Status: No, score=-9.607 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, 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 header.b=IKqOTqh6; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=rbGSwYjs
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N5K3DG9vBsVH for <netmod@ietfa.amsl.com>; Thu, 9 Jun 2022 01:54:18 -0700 (PDT)
Received: from alln-iport-8.cisco.com (alln-iport-8.cisco.com [173.37.142.95]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8EB87C157908 for <netmod@ietf.org>; Thu, 9 Jun 2022 01:54:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=4851; q=dns/txt; s=iport; t=1654764858; x=1655974458; h=from:to:subject:date:message-id:mime-version;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jYbGKF2gYzRsl/rlxBHkJPm6gNvVmSw280bK45lcPBO yc/RCsIvsYIZSv2BUOJS9vqW5hCIVfc+STND6CIMYUmjmlZfw6c9yYmfl+Lw23oiyARfVIXZ /+mnTKXJS9CU8xPlWPuL89EiOND7n1vngv7GMGkpzz5iuD2TCDOFt843K6mM7pRAFWs+lmPq b6y9qKiln1ibQEJSnOKoN5Ccg9RdyFT6FKfg5U/S9Nv6zFOQAkJY8I9C5t9E2C5t8y5Ttv1w 0w=
IronPort-HdrOrdr: A9a23:UN4Tsqy2lBWDVdk/RvU0KrPxlOskLtp133Aq2lEZdPULSKKlfp GV88jziyWZtN9IYgBapTnyAtj7fZq8z+8+3WB1B9aftWbdyRKVxe1ZnOnfKl7bamDDH4xmpN 9dmsFFYbWaZzUb/KXHCWKDYrIdKay8gcaVbJDlvhBQpG9RGsRdxjY8LjzePlx9RQFAC5Z8Po Gb/NB7qz2pfmlSRtinB1EeNtKz6+HjpdbDW1orFhQn4A6BgXeD87jhCSWV2R8YTndm3aoiy2 7YiAb0j5/T/M1TiyWsmVM73a4m2OcJ+eEzR/BkTfJlaAkEvzzYJbiJnYfy+Qzd7tvfrGrC2+ O83ivId/4Dl085OFvF5icEH2LboW8TA7iI8y7fvZKrm72GeBsqT8VGno5XaR3f9g4pu8x9yr tC2yaDu4NQFg6oplW12zBZPysa6XZcjEBS5tL7tUYvJ7f2qYUh37A37QdQCtMNDSj64IcoHK 1nC9zd/u9fdRefY2rCtmdizdSwVjBrdy32CXQqq4iQyXxbjXp5x0wXyIgWmWoB7os0T91B6/ 7fOqplmblSRosdbL57Bu0GXcyrY1a9CS7kISaXOxDqBasHM3XCp9r+56g0/vijfNgSwJ47iP 36ISdlXK4JCjfT4OG1re12G0r2MRSAtBzWu7Jj26Q=
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-AV: E=Sophos;i="5.91,287,1647302400"; d="scan'208,217";a="885243743"
Received: from rcdn-core-7.cisco.com ([173.37.93.143]) by alln-iport-8.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 09 Jun 2022 08:54:17 +0000
Received: from mail.cisco.com (xfe-aln-003.cisco.com [173.37.135.123]) by rcdn-core-7.cisco.com (8.15.2/8.15.2) with ESMTPS id 2598sHZx026554 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=OK) for <netmod@ietf.org>; Thu, 9 Jun 2022 08:54:17 GMT
Received: from xfe-rtp-004.cisco.com (64.101.210.234) by xfe-aln-003.cisco.com (173.37.135.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Thu, 9 Jun 2022 03:54:16 -0500
Received: from NAM12-MW2-obe.outbound.protection.outlook.com (64.101.32.56) by xfe-rtp-004.cisco.com (64.101.210.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14 via Frontend Transport; Thu, 9 Jun 2022 04:54:16 -0400
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MgtXq40wYODHN6nZuMu9PNrWH+ED1A+A9HfnaoOLM/xp4T4tVHWy9y8E/YQoVeDBgBEqeTRF/H94OgZw5F2E6Kba3JDDJJzplyzOTW/Jx03AXtaxVNQMx6Hpkc3mUfq9/HKa5fmecAzjgT5aPB4g0KiNpjgix+/tHmsWoCAzFe4J76L23E0Jr9Ba8r8q8+qFLCIEKxltJvbunfH0xMfJv0AvZZsFuQ3mL/ShIChaxkzD7ZlUq2jarF5MX7lyQp2zBWGMjms0pqVlwgX8fzCj9l+hTb1CvqGP5TmukTG8Bd/udQRZzuo5dSWlbFJsyqXG08+1Co0UZVnABnMXwnYvTg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0tO5K0R2XrEKMpCdOCj27OONDWgGdhevOpv10RskZkQ=; b=TI1TMq86SoXTf+epzt4SyLj5NC2YWwd9FO2ZQpsWVUflfpbp+C7vC7cLTByF9VkAd1evqix6yBSRyVGOUKjLUj0eQUDz6w2k0mOr98LTafTABTE6rJ2fSFPKd/eTR2LKS4r9hSYxEpFpc0uCvCF9O9iV1p3Fr5nZ8JTNkCmwM57cm6d7qXgpB/bmmw4jN0Uq/eiUNXY7eeCT0MVeiAqPlXncUHav9zW4DKFm7CWj6VK4GiiA+xkza0Pw8n6ejFLuP+dChUHmr8RZrYO/WYeXBfghyMdmokcQ2f/NSX1Y/VFnmITuEZdIfQyhZrkhy6Fo72J99v+rEwRcXebYWKhUEw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0tO5K0R2XrEKMpCdOCj27OONDWgGdhevOpv10RskZkQ=; b=rbGSwYjsjVDIfGlcrC0sj5iDQEcewTx0geUGPuoYSfmN5qpv4Qh4LffCeKCAONdbL0JlWp43eqwEiA3g24SIh0rYpS1xHlx6/jl+J3ZDIug2g8SWDra93YFFjDPA9cYiK6rWHZZOwP0yPH3quzWlyQX6tSRg9XjBAgIHLQSf83A=
Received: from DM6PR11MB2841.namprd11.prod.outlook.com (2603:10b6:5:c8::32) by MW3PR11MB4732.namprd11.prod.outlook.com (2603:10b6:303:2c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.15; Thu, 9 Jun 2022 08:54:10 +0000
Received: from DM6PR11MB2841.namprd11.prod.outlook.com ([fe80::dcc8:a2e3:f93:6d41]) by DM6PR11MB2841.namprd11.prod.outlook.com ([fe80::dcc8:a2e3:f93:6d41%6]) with mapi id 15.20.5314.019; Thu, 9 Jun 2022 08:54:10 +0000
From: "Jan Lindblad (jlindbla)" <jlindbla@cisco.com>
To: NetMod WG <netmod@ietf.org>
Thread-Topic: Unintended when-expression semantics in many IETF YANG modules
Thread-Index: AQHYe958bO1d7y02QUiFErG8DGpg3Q==
Date: Thu, 9 Jun 2022 08:54:10 +0000
Message-ID: <CB435963-D6DA-4F11-9E13-FC7B98933167@cisco.com>
Accept-Language: sv-SE, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-mailer: Apple Mail (2.3696.80.82.1.1)
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cisco.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: a01d1d21-2171-49d5-5fec-08da49f59e85
x-ms-traffictypediagnostic: MW3PR11MB4732:EE_
x-microsoft-antispam-prvs: <MW3PR11MB4732CF170E67FC68E031919ACAA79@MW3PR11MB4732.namprd11.prod.outlook.com>
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 03xj8sOTPqHjs3mSuK7zyUelgj1o1/3x5eC06m+hPxXWd/OxPYAC6RiXhR1hFMwB2JLyo1/I65ywrlJU1AlYx2EOzgs0JcG0a7+4wICJH64lBMsrdQXsczQs1LcrlyJ05Wv3i/93RBGK7R6Hf8+HbieRZsFQnpYB7BPgn2D/jXxN3+9w7/fjtira4ziuU6x7bvoJxIGjDuUATEOtOe1Dn1XJMihD7LJVPgLTyQ6hKRRKQz7SDi7he5rlW3SKWV7zE03CyqOx+72tL/TOvbguxsByLz+XPOAAx3B+XCJnOQYDp+q0S+/MU7UCDdqYCen5PGJFWrbn84ihVCvxxfSqY0XqQb4DwqZoC91QHjiqcb/yCDRbkAld0BK/xnzDm2dJ3DSJgGzSdC+9BnpTTBCVo/Oy4z3WT8FRsaFGh+IEGyhw/+ns9sGlSHCZfYdLHyp32RwtzMriLk1qZgB4JSe4Jn7A9qNG5di6vmpAYkQuZo8uv7QHgJut18r3aAMnYDyJ0fMIDlJe1dhNGqbr+1OdUEY8/lqAi7nhTMILo2WF9YnSr0D7jVKTOh69iNXFQHz9CmtVnCPzNso7ik6FrGEwUYDWw/H1rO6nA07FjSGsp80BgGY5zU65ofxryefn2ekGuqT/aeq0roe2mnMwFy7G2VdoW7MdWUipOpoze+ZDwWitoDkPLEqoYohrsNSAROM5F6dXAyQk84Jt/p0+rhD5UhSMwb9L6XpEmyK5W9zWaAsRgdRI1DEehlPnuAEMnmat
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB2841.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(8676002)(122000001)(33656002)(6916009)(71200400001)(6486002)(8936002)(83380400001)(316002)(508600001)(66476007)(66946007)(2906002)(186003)(76116006)(91956017)(36756003)(38070700005)(64756008)(6506007)(66446008)(66556008)(6512007)(26005)(38100700002)(5660300002)(2616005)(86362001)(45980500001); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?kkFt72HTsZmzO+n9LpKIoTbdWfgCPzJ9eCiTIxOt3ASDN+EF6bqvsI4sFBL8?= =?us-ascii?Q?gSBYVHR9j2pfvMrN1gHt1ASRXPSxzMTQmLDFXwzsdBcJwjjFq6XIdmx5pOfg?= =?us-ascii?Q?VwsB7Okh1CRoWd5tcti2mFuszWJDHRsGBqQdH13lTrerLroa7bivqMhOGIlQ?= =?us-ascii?Q?txTMd2QsYcviHafBC01YvqthiEgCn4bQ4b07p5tI3Tykv6K50R6Nt8BaaGy3?= =?us-ascii?Q?19eDa0dVHN2TN05hkfjIrgjz5xhRNayR6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kv05SP9LB6Mmw+MqG0izhUFdUHnJr9BO4aS48YahVAw5MAuXC8yY?= =?us-ascii?Q?ZU9xez7q3THNAbNiST3LsdTrhCK6ZUhS5bqKwOuID7tQkxWeuQzabWNK3xI+?= =?us-ascii?Q?uHmnct09vkg+/rN/RF0itQXnTGnvq/YUZI+tw839/vWkb8kwVpitPAOHX+8o?= =?us-ascii?Q?KoVDg6duIvL5bJTOIiQ937UhKh+NjpLM9gplaAxnAmuDWrqf7dmBsgnikBvu?= =?us-ascii?Q?YUT4RF4A4gHCmqXS1VGonM+cZXtevQnqFUvyZ4YeyRx5z5882RV4WMl1wmVP?= =?us-ascii?Q?YKj4yY+kgYfJMOy2SQjvSYAjdTMzEAxt2GFVpRaV8ZkQMOl6rGPc7gj/iM9f?= =?us-ascii?Q?zij8yOETixuB15B//YOn3PgHZv/JdleoQFnsuiAtn8HHUxgQcUMvrPW9dNR3?= =?us-ascii?Q?Y+Tpypd+AV73AMLhhVR55JgmyIVjGJAPppZ6QIrgTANAyjY6Rn+mFA7PpMgB?= =?us-ascii?Q?GFXA6jUZ5MV/q+s99coJ0RpBF7U348q5LDk7v8FR+YHu19K1H6LNamHB1rZH?= =?us-ascii?Q?gcs9d7IptuNeWBN+frosvM0G2ggJfEDF9b0hmJHq0K7kcVAymC8s4CFq7xMM?= =?us-ascii?Q?eEZEFSUN0wOrb6EqjiIVuKDO2B6A9Vk=3D?=
Content-Type: multipart/alternative; boundary="_000_CB435963D6DA4F119E13FC7B98933167ciscocom_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB2841.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: a01d1d21-2171-49d5-5fec-08da49f59e85
X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jun 2022 08:54:10.1546 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: QrZpyZ1PcCyKpvJPHI90W5UTlX0LVOBxdGtFWCBqmmAc+TyQGmmmDVICcxtAEsq+CiIARB8Q01U+v7zf0L814w==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4732
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.37.135.123, xfe-aln-003.cisco.com
X-Outbound-Node: rcdn-core-7.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/WjpvBU2_BQ1zB71jovWYKyKCi7o>
Subject: [netmod] Unintended when-expression semantics in many IETF YANG modules
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.39
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: Thu, 09 Jun 2022 08:54:24 -0000

Hi NETMOD,

A few days ago, as I was looking for examples of when-expressions in standard modules, I stumbled over this in RFC 8944:

     augment "/nw:networks/nw:network" {
       when '/nw:networks/nw:network/nw:network-types/l2t:l2-topology' {
         description
           "Augmentation parameters apply only for networks
            with L2 topology.";
       }
       description
         "Configuration parameters for the L2 network
          as a whole.";
       uses l2-topology-attributes;
     }

... and a few other similar constructs in there.

As you can see the when expression is unconstrained when it comes to which network it refers to, which changes the semantics from "Augmentation parameters apply only for networks with L2 topology" as the authors are wishing for to "Augmentation parameters apply to all networks as soon as there is at least one with L2 topology".

Aside from RFC 8944, I also noticed very similar problems in RFC 9094, RFC 8542, RFC 8294, RFC 8513 and RFC 8782. The list may be incomplete.

What do we do with the broken YANGs modules in these RFCs?

Since this seems to be a rather frequently occurring issue, are there any mitigation steps we should take in NETMOD, apart from strengthening the YANG Doctor review process?

What can we reasonably do to ensure all YANG Doctor reviews catch these valid, but unintended XPath expressions before publication?

Best Regards,
/Jan Lindblad