Re: [Ntp] Antw: [EXT] Handling of future versions in historic implementations
Harlan Stenn <stenn@nwtime.org> Fri, 23 September 2022 21:02 UTC
Return-Path: <stenn@nwtime.org>
X-Original-To: ntp@ietfa.amsl.com
Delivered-To: ntp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DA0FAC1526FD for <ntp@ietfa.amsl.com>; Fri, 23 Sep 2022 14:02:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.107
X-Spam-Level:
X-Spam-Status: No, score=-1.107 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, NICE_REPLY_A=-0.001, RDNS_NONE=0.793, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_PERMERROR=0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=no autolearn_force=no
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 wKRrXEMLFUyi for <ntp@ietfa.amsl.com>; Fri, 23 Sep 2022 14:02:13 -0700 (PDT)
Received: from chessie.everett.org (unknown [IPv6:2001:470:1:205::234]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D9C59C1526F9 for <ntp@ietf.org>; Fri, 23 Sep 2022 14:02:13 -0700 (PDT)
Received: from [10.208.75.149] (071-084-168-128.res.spectrum.com [71.84.168.128]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by chessie.everett.org (Postfix) with ESMTPSA id 4MZ4N53591zMP9P; Fri, 23 Sep 2022 21:02:13 +0000 (UTC)
Message-ID: <c76f6447-7890-7ef2-cda1-20414cc948d0@nwtime.org>
Date: Fri, 23 Sep 2022 14:02:12 -0700
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0
Content-Language: en-US
To: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>, "ntp@ietf.org" <ntp@ietf.org>, mlichvar@redhat.com
References: <Yyx+VOkuFCAuBBYb@localhost> <632D5FEE020000A10004E0D9@gwsmtp.uni-regensburg.de>
From: Harlan Stenn <stenn@nwtime.org>
In-Reply-To: <632D5FEE020000A10004E0D9@gwsmtp.uni-regensburg.de>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/5nVpAwjqa6IBKTfQhikne4FgKow>
Subject: Re: [Ntp] Antw: [EXT] Handling of future versions in historic implementations
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Network Time Protocol <ntp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ntp>, <mailto:ntp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ntp/>
List-Post: <mailto:ntp@ietf.org>
List-Help: <mailto:ntp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ntp>, <mailto:ntp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Sep 2022 21:02:17 -0000
On 9/23/2022 12:27 AM, Ulrich Windl wrote: >>>> Miroslav Lichvar <mlichvar@redhat.com> schrieb am 22.09.2022 um 17:25 in > Nachricht <Yyx+VOkuFCAuBBYb@localhost>: >> I did a bit of archeology to see how the older NTP implementations >> handled future versions, now that there are some concerns about NTPv5 >> making incompatible changes. > > Thanks for the work! > > ... >> The NTPv1 implementation (ntpd) was written by Louis A. Mamakos and Mike >> Petry in C. In the code I found (from May 1989) in the main() function >> there is: >> >> if ((pkt‑>status & VERSIONMASK) != NTPVERSION_1) >> continue; >> >> receive(dst, pkt, &tv, i); >> >> That is, future versions were ignored. > > ...and "older versions"... > >> >> The NTPv2 implementation seems to be a new implementation written from > ... >> Again, future versions were ignored. >> >> The NTPv3 implementation was based on the NTPv2 xntpd and the NTPv3 > ... >> This seems to be intentionally handling future versions as compatible >> with NTPv3. > > A bad idea as the version was not defined at the time of writing > ... > >> >> The NTPv4 support was implemented in xntpd by David Mills and it was >> renamed to ntpd. In the current version of the code there is: >> >> if (hisversion == NTP_VERSION) { >> sys_newversion++; /* new version */ >> } else if ( !(restrict_mask & RES_VERSION) >> && hisversion >= NTP_OLDVERSION) { >> sys_oldversion++; /* previous version */ > > I think the assumption was (at the time of writing) that there won't be a > version > NTP_VERSION, so the oldversion test would apply to the interval > [NTP_OLDVERSION...NTP_VERSION-1]. You would be wrong. > As obvious in all example code, a comment explaining what the code is supposed > to do would have been helpful. > > ... > >> The future versions are accepted as "previous version". This might >> seem like a bug, but from what we have heard on this list recently, >> it was intended. > > I think that's just a "postmortem interpretation", but it never was the > intention. You would be wrong. >> >> So, it seems this idea of future versions being compatible with older >> versions started with NTPv3, but for some reason it wasn't specified >> in RFC 1305 or RFC 5905. > > As stated before, I think "it's a bad idea". You are certainly entitled to your opinion. > Regards, > Ulrich > > > > _______________________________________________ > ntp mailing list > ntp@ietf.org > https://www.ietf.org/mailman/listinfo/ntp -- Harlan Stenn <stenn@nwtime.org> http://networktimefoundation.org - be a member!
- [Ntp] Handling of future versions in historic imp… Miroslav Lichvar
- [Ntp] Antw: [EXT] Handling of future versions in … Ulrich Windl
- Re: [Ntp] Antw: [EXT] Handling of future versions… Harlan Stenn
- [Ntp] Antw: Re: Antw: [EXT] Handling of future ve… Ulrich Windl