Re: [babel] [netmod] NULL value for ip-address

tom petch <ietfc@btconnect.com> Wed, 15 September 2021 10:58 UTC

Return-Path: <ietfc@btconnect.com>
X-Original-To: babel@ietfa.amsl.com
Delivered-To: babel@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 842DB3A1271; Wed, 15 Sep 2021 03:58:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=btconnect.onmicrosoft.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 RC9ZKXmdJtuw; Wed, 15 Sep 2021 03:58:54 -0700 (PDT)
Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2100.outbound.protection.outlook.com [40.107.22.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 43CDE3A1272; Wed, 15 Sep 2021 03:58:53 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kET6emweDWUcw9TZYJiyw1TDs8AqT5dTC01fvH9iNWDSv6HER3WqOOW93XQuizlMqJ8IB6npY+4ifwoqcFyex/udYhe0FhGh8rZkYODNfkC0t/H/0PGwEJuJ+1Bbzd1H619j2YDB25CqY9XtuxB288ikTHPPhmrRrFvF0Jcd+5u9FR+bjQWpVNCeW0j9bRGwv9RLoqPfpGC8vBhqAeyldcPyPlV55sKajBEODbFTXmTYTm/FJu8f4wuoKD6auokntx/FVmRk1xdFqzvqUxZR7KTYQIEtVItHjMloRc0T8spz/vG1DS2GhE7+gxZTb4jNAf8QHtc0XUREqVVjCnaQ6A==
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; bh=jyLRzG5ITz3wXxrmEIr594zReO7Uk4wwv3jslYsGfCQ=; b=VsJOi3xYWwpb2cq3C1MW0C/gP+jcOmuSISLCCq18rBmPIg+ns4FqSE1D6aP9TSCthdKtxNgMREB+2bCP59e6XIS3lvcawkPNnzO17hUUkGGXyV5MJVlk+vY+Zz45bpi+gQdgroprkqdYwUezcZxGfuCEzbSAc9eWWtgXY2iSE+I5nqnO1fQCepn77WxD6ooX44WNcjFPKkfmNca7vDMZbV/OYJ7HabTFsBnEBs4PTY1dQItTMhg6hfUlLukrTe75HwprxJ6U6Ws24C1y5oQqRuChxorGzrPQjLaJqQBXawRPUHiL6XSugvqYBPY8oatXBSOMmZtcF6mhWo6wIqD9Rw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=btconnect.com; dmarc=pass action=none header.from=btconnect.com; dkim=pass header.d=btconnect.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=btconnect.onmicrosoft.com; s=selector2-btconnect-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jyLRzG5ITz3wXxrmEIr594zReO7Uk4wwv3jslYsGfCQ=; b=q9Vd60Mrs6D25AJk+EsbsLIpS14LABnlZcx77HC9ev6FCRyvt9d0LJ7HEVLWK7HYiPK7cfbniiJaOqGlYsN8ELT/i6Qs/y8iN/hVlo4Zv25RiYeonErnqqBFuZ7W8UtRbJYz4r8wN1ODwiMwm/LkYTuUJfN/ySCMgZt298c/ZiY=
Received: from AM7PR07MB6248.eurprd07.prod.outlook.com (2603:10a6:20b:134::11) by AM5PR0701MB2915.eurprd07.prod.outlook.com (2603:10a6:203:42::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.9; Wed, 15 Sep 2021 10:58:50 +0000
Received: from AM7PR07MB6248.eurprd07.prod.outlook.com ([fe80::b9c8:47dd:34f0:7180]) by AM7PR07MB6248.eurprd07.prod.outlook.com ([fe80::b9c8:47dd:34f0:7180%6]) with mapi id 15.20.4523.014; Wed, 15 Sep 2021 10:58:50 +0000
From: tom petch <ietfc@btconnect.com>
To: Carsten Bormann <cabo@tzi.org>, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
CC: "netmod@ietf.org" <netmod@ietf.org>, "STARK, BARBARA H" <bs7652@att.com>, Babel at IETF <babel@ietf.org>
Thread-Topic: [netmod] [babel] NULL value for ip-address
Thread-Index: AQHXqiCqgDJcR3KJe0SBfixmaEpJDg==
Date: Wed, 15 Sep 2021 10:58:50 +0000
Message-ID: <AM7PR07MB6248B7058FA3C5E05114E8B4A0DB9@AM7PR07MB6248.eurprd07.prod.outlook.com>
References: <20210910200902.bic4rhyhp75bgsjz@anna.jacobs.jacobs-university.de> <BBC6AA9F-86C1-4A9C-86FD-AD77668CA9D9@gmail.com> <20210913200455.xot7lihpmqiemm5c@anna.jacobs.jacobs-university.de> <DM6PR02MB69248D2780D5C880CC647783C3D99@DM6PR02MB6924.namprd02.prod.outlook.com> <AM7PR07MB6248BBB558136D1E6F8C1549A0DA9@AM7PR07MB6248.eurprd07.prod.outlook.com> <DM6PR02MB692446F49506791E90B0D23EC3DA9@DM6PR02MB6924.namprd02.prod.outlook.com> <20210914171729.ph5q77zm46z3zvxi@anna.jacobs.jacobs-university.de> <FAE5986C-BE56-44A9-A6A5-1A37D9539F61@tzi.org> <20210914191618.khcicr6o4x5sdki3@anna.jacobs.jacobs-university.de> <21E40C00-5C1B-4C54-9CDB-B99AC14B1F3E@tzi.org> <20210914235319.is4x5nzuqdz26dv4@anna.jacobs.jacobs-university.de> <AM7PR07MB62485B09ECE52AE1C4154B29A0DB9@AM7PR07MB6248.eurprd07.prod.outlook.com>
In-Reply-To: <AM7PR07MB62485B09ECE52AE1C4154B29A0DB9@AM7PR07MB6248.eurprd07.prod.outlook.com>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
suggested_attachment_session_id: 9e2be7a4-7435-82aa-9d58-94ae298f96b5
authentication-results: tzi.org; dkim=none (message not signed) header.d=none;tzi.org; dmarc=none action=none header.from=btconnect.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: f1361d32-de78-4a35-6785-08d97837ccf3
x-ms-traffictypediagnostic: AM5PR0701MB2915:
x-microsoft-antispam-prvs: <AM5PR0701MB29159707E3C18B3102022228A0DB9@AM5PR0701MB2915.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 1ZXfChJ3ZIb1NPmHyeA8SRvHBFcvYOb+Mjb8WZ9RLrBxTM3b2R6Gvljwh4uqopD5CSyueoIo/8avU5jBbXcRuc+rcIH8heswbpmgpq4PPmlfIgwBD8Sm7JmC24R/1LY1qJ7s948oQQlD886GKtAaUG6dX9upyzqLKzA/oJRyhn7bWZm6kkCb+mmYAllTfLTArNqcQRjJcLm8+796xq18XM1V4rKINSzbMR8ln5Yo9WLu0AgyJWcfFIifrQ1ToaqjVdtaFEgnaRpPgCmpes5y0l5+6T56xbFHUM2y+7nDm0jMVxEqhPCxuwvFb1mFzrvoCoQvfELRFp9weC4WxdmQG4RbFqmLgMOFZHnKmV8FQbJPzgM2IuwUmjErF9nKEpWIVKrQbzdmi6z9xPY0zx5nkim6pqbk8Xu8YWFe0ZN4v6WLJjWDqtYdauySYeyG6HOqtt0aLa0zaAHmRIh1z7U53m/9QyHvHsH33gVSNWdUY3TNWKzevEjZTWPnDq5y1GKTagIS5Y9gJHiW81aVbUC+a44TcZQ3R6qfBheFUmHmpGWlO30sd/BPuj/meONuuBFROaqmS/rtFg6zI1oWcnH0ZK/1MXH66q9pMDBBjEOEhhOiCUp9yMK0gFucl5sqsF+h1UXhWp4K/RGbvwWg6V3Z+KQUjLcMMexo7gYS8cp94OZqJ1HrrJeiL9Qtu6RAXbb3t/WXAWeJbhxPU2bjF/z8fkYeRe0v4sTp40WLP8ASCXdm5uJlpTn9sNXu9lxd2FSbFeQhbBU8F1rt3tNHRjtA97bW42uolTe85jpHHMhmm/k=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR07MB6248.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(396003)(39860400002)(346002)(136003)(376002)(8936002)(7696005)(2940100002)(122000001)(66574015)(40140700001)(38070700005)(966005)(86362001)(5660300002)(6506007)(83380400001)(8676002)(4326008)(76116006)(66446008)(66476007)(38100700002)(64756008)(66556008)(91956017)(54906003)(110136005)(52536014)(26005)(316002)(9686003)(478600001)(55016002)(33656002)(71200400001)(186003)(66946007)(2906002); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?u83M21t8PjHR3lDNDcgXTBROKmK8Bji40BOQ8ddWZsdff8TLByBgP+kr?= =?Windows-1252?Q?g4oTPyf0hfqeNG+7BALJKuH2nL4HnfzrVngB/VLYyKg0V0S+pKo+d9Fk?= =?Windows-1252?Q?WH8uU++QNCCFvIQItr49uTmonMr2nuZVRUsxzVQmym6Uai4ZQCYeodrk?= =?Windows-1252?Q?NyOvC5bBRM9sS3q3ouf3OpiEA+Ni45cd62LDQu0BzpafQYRSfvS9EKqb?= =?Windows-1252?Q?yO5JF7tEw8af/f46Zj1VwVtiY3L8XE18vKBMYbmIxAguWN1bVNteLrqg?= =?Windows-1252?Q?9mkQ4Ie8hxXeS6cUecB2p6C8qtxOUUa5miSLnI/mPMRSya53NeOPA58/?= =?Windows-1252?Q?wTfmL6vRn78HpTBLzFY+R4w7Ry0uW4rjRtb4dP55Dc+WscJhBMlnpQzn?= =?Windows-1252?Q?uwjty+wkrI+C2UZUvOx3lGQcYTHJWLXqluqgYQq/fLFjYJOzuUdd6ToE?= =?Windows-1252?Q?s/RlwC7YMTbTKgZrZUlKqES3EE9/8bXh7RC7N20KtdnSdUgf3FbV15Nr?= =?Windows-1252?Q?0gPyoORdReBJEHZJUMhLY4xzMadc943o6cjMEeLi4MuXMXZsdJnDloHF?= =?Windows-1252?Q?IgJetB4I5BDXt00aot9QtRriBHWd12GSP2Qcx8/G6Pl+7QJj1tgPy6nm?= =?Windows-1252?Q?CqDlxhHEIATW5GVwcGxdP9RMypjacPg6MF2UuNL/BszJBL3A4BvGMdgK?= =?Windows-1252?Q?7mAEQlyeSEE3wiJmtl9BkI1JcV1NCc7ECkwDaVmBj/eKdXEC2uXO75qp?= =?Windows-1252?Q?aBwmwrPSaD9tRRlonihvIE6MZOSXZSk6sq5Z5n8L1eMVBYSHO95mETHY?= =?Windows-1252?Q?xC8m3tDayS6hamsUKrvq8st4TmSnSQZs5M7AcYu2UyJJC4wkLkUaGSH7?= =?Windows-1252?Q?OwDs4cybSSDtX4a8zs3qoKRdpVJJns5VBWZZUjjE2g1uPV5AvDA4IG/w?= =?Windows-1252?Q?3f49cwkNygCkn4oZ+445KzrbNEHrAVH+BVtboWZaoNwtLUrrSeQzOANg?= =?Windows-1252?Q?ZzwSeBf5pwst1Id1IEzIDa1tqZU9vGE7N8nwSlwh7I6JKw3HaMiz9imv?= =?Windows-1252?Q?qmxVbNkDwoCwsheGWL1pqhNu2lFxDUEVfO5rjFYbq7bdfzSjEm8ovvdn?= =?Windows-1252?Q?t1SP+HUDBw5K7QXSWL+ShF5+1RsAMy2NEDsBRBMbdXVeobs+w0JqPTxJ?= =?Windows-1252?Q?37hiss98zsGp/r3aVNzGVq2q1TKyZ8yzDfiVNqUJXhgAR267suVA8S99?= =?Windows-1252?Q?om1Xe4zZsiUKneZp7oxzgm0jfhdRbzx4wCcQvmMoZCmRLEFiLPUCH2K7?= =?Windows-1252?Q?nsoflmYu4+KN7MytO60SPO1LghX8N5aXQ/EZv7UHuh76Rr0laILRjq0P?= =?Windows-1252?Q?6x/dKngci4ygwGcMhxWUzYnIGekC+FUJja4=3D?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: btconnect.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: AM7PR07MB6248.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: f1361d32-de78-4a35-6785-08d97837ccf3
X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Sep 2021 10:58:50.5320 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: cf8853ed-96e5-465b-9185-806bfe185e30
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 3SddzP/sitnx2+F6JGBfB44C/jTvuKrHAriqBk3PbYE2vnHQ3zSVEJwd1TK/DDAyGeBwad4E5rpU4LORdFROqA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0701MB2915
Archived-At: <https://mailarchive.ietf.org/arch/msg/babel/_kTaF5wDSjetxo9f-hzDKgGGMFU>
Subject: Re: [babel] [netmod] NULL value for ip-address
X-BeenThere: babel@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "A list for discussion of the Babel Routing Protocol." <babel.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/babel>, <mailto:babel-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/babel/>
List-Post: <mailto:babel@ietf.org>
List-Help: <mailto:babel-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/babel>, <mailto:babel-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 15 Sep 2021 10:59:00 -0000

Barbara

Top posting a slightly different question.

Belatedly doing my homework, I see that not all the NULL are uint16.  One, next-hop, is ip-address.  We have the options discussed for uint16 but could also use zero (or some other value) to mean NULL.  Zero is of course the way the default is commonly represented.

How is this handled in TR-181?  How would you like it handled in YANG?

Tom Petch





From: netmod <netmod-bounces@ietf.org> on behalf of tom petch <ietfc@btconnect.com>
Sent: 15 September 2021 10:04

From: netmod <netmod-bounces@ietf.org> on behalf of Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de>
Sent: 15 September 2021 00:53

On Wed, Sep 15, 2021 at 01:01:11AM +0200, Carsten Bormann wrote:
> > If BBF already
> > defined to use -1, so be it.
>
> That works for me and is consistent with the information model in 9046.
>
> What I find not so great is the side effect of going from uint16 to int32.
>
> I don’t see a big difference between
> Optional-uint16 = uint16 / -1
> and
> Optional-uint16 = uint16 / empty
>
> I do not like
>
> Optional-uint16 = int32

YANG leaves the bits business to the encodings. In YANG, you can of
course use

   type int32 { range -1 | 0..65535 }

and then its left to the encodings. Im XML/JSON, -1 is 16 bits and
65535 is 40 bits - and the name of the leaf is likely worse. I am too
lazy to lookup what the CBOR encoding would do with the range...

<tp>

I am with Juergen here, and in a previous post, that if that is the way it is done in BBF, then that is a compelling reason to do the same.

Also, you can create a typedef for it, in one place in the model with a description, both in the YANG and in the body of the I-D, and then use that type in all the places that it applies, which, for me, makes for a clearer, easier to understand model.

I suggested boolean but agree that it is clumsy, not quite right (although I have seen it somewhere).  I suggested choice/case because that is what others do but as before, following BBF is a more compelling argument.

It also addresses the problem of access control making it a challenge to know what is going on.  The one leaf, the one object, you get it or you do not.  Simple!

And if you want to save bits, then YANG is not for you; the design aim was text that anyone could read anywhere; if you want to save bits, then you need a compact binary representation:-)

Tom Petch
(who is on European time)

  > > The alternative is to not

instantiate the leaf if there is no value
> > and to accept that a client can't tell the difference between 'there
> > is no value' and 'the value has been suppressed by authorization'.
>
> Interesting.  I wasn’t aware that this cannot be distinguished in YANG.

I have to correct what I wrote. Its the leaf that is suppressed, not
the value.

In XML, if <foo/> does not exist, the client gets nothing. If <foo/>
does exist (and it's value is empty in this example) and authorization
rules say 'don't tell the client', the client gets nothing. A client
not getting <foo/> can't decide whether there is no <foo/> because
<foo/> does not exist or authorization prevented access to <foo/>.

Authorization is not part of YANG. NACM started as an extension to
NETCONF in order to control access to data. Initially the acronym NACM
expanded to the 'NETCONF Access Control Model', RFC 6536.  The revised
NACM also works with RESTCONF (and likely other protocols) and hence
the acronym now expands to the 'Network Configuration Access Control
Model', RFC 8341.

> But an “empty” would be present if it is chosen, no?

You grant or restrict access to <foo/> and it does not matter what
type <foo/> has or which value <foo/> has (if it is a leaf) or whether
<foo/> is the root of a deeply nested tree (if it is a container).  If
a client has no permissions to read <foo/>, then <foo/> is silently
omitted.

Things are different if a client attempts to create/write/delete
<foo/>, in this case the client will get an explicit authorization
failure error. For the details, see RFC 8341.

/js

--
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>

_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod

_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod