Re: [netmod] iana-if-type.yang has multiple revisions with the same date

Andy Bierman <> Tue, 01 March 2022 14:49 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id D1CE73A0AAF for <>; Tue, 1 Mar 2022 06:49:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_PERMERROR=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id hMqkymfbyfTY for <>; Tue, 1 Mar 2022 06:49:22 -0800 (PST)
Received: from ( [IPv6:2607:f8b0:4864:20::1133]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id A58193A0AB0 for <>; Tue, 1 Mar 2022 06:49:22 -0800 (PST)
Received: by with SMTP id 00721157ae682-2d646fffcc2so147303457b3.4 for <>; Tue, 01 Mar 2022 06:49:22 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=y/EuLvWSrCZ4NDNCObcTqL9gh1P+qLZCDmGb4TQ7ahs=; b=Pd97xG6tUzC0wAK/9nvd90raPYlfoDjZc59fy0/q3mkEg0BuLd7fAKxJxMgf7/mV7x QSwWRkImJ4TRoolqOSuK9gxxJWdfSYAJpp/9pqU20HuwU3wPhMJ8eLiqF8KBX50Tbwpq z7xMXVlNf7f+NN7mczV61ZfJWd34JbXiWFPGETup/RJSzm+wDt8J5sM10EYGxO+BU7ki L/TfZF1y/kOC6iiI8XqoYHHgN0rDT9/pb3GFQcjtvBhpOaL15s/tUcEQyZe6I/k2n0Im Igvx8FUPQKIz5HMMBhoMUMBSmN9GcuS04Ug9vP0VKlsY/PfciSYLQnFfoed8lnvnT2yl txWQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y/EuLvWSrCZ4NDNCObcTqL9gh1P+qLZCDmGb4TQ7ahs=; b=Hp/ZXnsbc2frSOFWCuCtUP3eEFcv9hH7pCS+0V+1FuuKGELCt98pOiOYmggqtFSuQm w2mwDgSnd0FkIUoqQNxXWsFoWECD2PWnA24HdNUBW+89m5I3Njg53Sa1H5b8wzX5L7Nc zy5CsVqNDlHOP4hdR4GE5v/x8PJh10pWY9DheYW0PAHTsMT/J3Ls052406Xe3F3K1YUo fuaZIK/eqLJ25ldIkFJU3wbacWOEHeq8TYydNGPTtZqfq48ICx7lM0hmhZN50Qj+qvB4 4r6emSm/IuRa/Z3h2xUlY6Bllat5O/oaBroJ8x3Zr10u6xT5f0MDCzrJrr2Aau5uP6lK EFPw==
X-Gm-Message-State: AOAM532DtWOkzKoZBqm37DVwtXAm5gVfVIkkdced2VVT0omvfIIl5jYw mJHijn5XhxffJv4/id1NAcQ3tFX2/LrG7lw+duigoQ==
X-Google-Smtp-Source: ABdhPJzp6TfjKyaCFroshBYMysKZ+IBKwd+27ngOLZ5jyaqVXyX7y6Bdgs2Rez7Y6kxird9hnyB/joxul2XMzCYWfcI=
X-Received: by 2002:a81:7c7:0:b0:2db:f50a:4b02 with SMTP id 190-20020a8107c7000000b002dbf50a4b02mr1534511ywh.350.1646146161125; Tue, 01 Mar 2022 06:49:21 -0800 (PST)
MIME-Version: 1.0
References: <>
In-Reply-To: <>
From: Andy Bierman <>
Date: Tue, 01 Mar 2022 06:49:10 -0800
Message-ID: <>
To: William Lupton <>
Cc: NetMod WG <>
Content-Type: multipart/alternative; boundary="0000000000002ec00005d92945b3"
Archived-At: <>
Subject: Re: [netmod] iana-if-type.yang has multiple revisions with the same date
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 01 Mar 2022 14:49:28 -0000

On Tue, Mar 1, 2022 at 4:54 AM William Lupton <>

> All,
> Sorry if (as is quite likely) this is a duplicate.
> I noticed from
> that
> there's a (long-standing?) problem in iana-if-type.yang
> <>:
> it has multiple revision statements with the same date:
>   revision 2018-06-28 {
>     description
>       "Registered ifType 294.";
>   }
>   revision 2018-06-28 {
>     description
>       "Registered ifType 293.";
>   }
> This has presumably happened as a result of an automated update script
> that doesn't check for this case (*)? From a quick scan, I didn't see
> anything in RFC 7950 banning duplicate revision dates, but RFC 8407 section
> 4.8 says "*If the module contents have changed, then the revision date of
> that new module version MUST be updated to a date later than that of the
> previous version*" and of course yangdump-pro is checking this.
> I think that this should be fixed. What's the best way to achieve this?

I think this issue should be resolved as well.
The YANG library identifies each module by a [name, date] tuple.
The <get-schema> operation uses this tuple to identify a specific revision
to retrieve.
The import-by-revision mechanism uses this tuple to identify a specific
revision to import.

If this [name, date] tuple is not unique, then it cannot be mapped to a
single module revision.

Note that with multiple release trains and the new SERMVER, it is likely
that multiple [name, date, label] tuples resolve to the same [name, date]
making the uniqueness problem even worse.

This is quite significant if a client reads the YANG library from a server
and decides it already has the module cached (based on the [name, date]
as defined in the standard.  Then it will not use the <get-schema> operation
to retrieve the module from the server.

YANG artifacts and SID files also rely on this [name, date] tuple

Even with the new versioning drafts, it is impossible for the client to know
"Do you mean the REAL module foo, version xxxx-xx-xx, or your private

> Thanks,
> William


> (*) In the rare event that multiple changes are made in the same day,
> perhaps the second change should be (strictly wrongly) assigned to the
> following day. In theory this could cause revision dates to run far into
> the future but in practice I don't think this will happen :).
> _______________________________________________
> netmod mailing list