[Ntp] NTPv5 KISS code support

David Venhoek <david@venhoek.nl> Wed, 01 November 2023 14:38 UTC

Return-Path: <david@venhoek.nl>
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 9E8EDC15109D for <ntp@ietfa.amsl.com>; Wed, 1 Nov 2023 07:38:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.909
X-Spam-Level:
X-Spam-Status: No, score=-1.909 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=venhoek-nl.20230601.gappssmtp.com
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 UF3Pp5x-MMGZ for <ntp@ietfa.amsl.com>; Wed, 1 Nov 2023 07:37:58 -0700 (PDT)
Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 6C08DC151065 for <ntp@ietf.org>; Wed, 1 Nov 2023 07:37:56 -0700 (PDT)
Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-9d2e6c8b542so560117866b.0 for <ntp@ietf.org>; Wed, 01 Nov 2023 07:37:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=venhoek-nl.20230601.gappssmtp.com; s=20230601; t=1698849475; x=1699454275; darn=ietf.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=at8UllkBjTwSrpszFjO2xTVQBs/lIa+USYygq9umD/Y=; b=hdaCEen17+TEyX4LsxFgPGPkOyU0qUZ17mhC7i3WApw7URMu9huCcS4VgP2cf47ZqA CFIZ451Mn8PV8hq8QBCLbMKy0GSKLbkMW/sZkO5q+htXzldvudLRefC6bXF9qLyeqX0S QbjF5+4CltZUmOU17Y2wwfPexokI2WVx7fGzQxM3HrilQtfniv7+ok2Arl+8j+suXuHY U56mbJsv92prKjMF3/eP1dwk56wduCuoSVtSRww7IniT3/QqXveLIIArBgDnCZcLstK2 RzhPqsev5OLZdTvhV9eGn4fGtcrMnvJTXQl4xMcbNAFWe8kQa5BjTQBsdR+p99SutVVD X0LA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698849475; x=1699454275; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=at8UllkBjTwSrpszFjO2xTVQBs/lIa+USYygq9umD/Y=; b=c5tR/+e/CRIprvgXNy22/4fBxeJq286D+VQb2dgv4QABq8TGbjWaBlWNo6lRh1V4Xe cjEBNxJopZwXBcl5jC2hXAGkDG3AJIMmHnF+yvXrlzJPieWqcTVYRKCgAy6QAvHhoWv0 d0bTIeWkOKHd5eQ6hJn9cFZ4PyOMIDPaI94XEFkGei2Q90+eZ38OuXm8gSJOeirWg+3T 8tGMX6G1gndgFzr6iz0adB9wA94b+yif1o6SkRLUSOgygA6t4Vs4/9ft1DpfWzFmO7gS b6NgaqrkIOgDB9EFpbcnEHmLwUrEqVFKKb0Q8+KAeGAyEaYYx5m+ufmXBTgH+GqTkn7Z Ir6Q==
X-Gm-Message-State: AOJu0YyGNPRmtamwhKZlTdRYQzymWh7pM1y3Lf4rdttXqxNKL3CnyBNT BF8a463QgRvTxPHB+i9YJ111CGX6SVxb8tFrAZZ76bRnrqrVhFObYXyhhA==
X-Google-Smtp-Source: AGHT+IEitOBbZUlMdbsUb6ir3Ern0EfJMuDu/LZJmDfWrK5h9WoUXXDp3a+YCBEQr+LqEYPhmVpkwvGaEqJRXViWvaQ=
X-Received: by 2002:a17:907:9603:b0:9d3:f436:6807 with SMTP id gb3-20020a170907960300b009d3f4366807mr2096773ejc.42.1698849475351; Wed, 01 Nov 2023 07:37:55 -0700 (PDT)
MIME-Version: 1.0
From: David Venhoek <david@venhoek.nl>
Date: Wed, 01 Nov 2023 15:37:44 +0100
Message-ID: <CAPz_-SWRUTB2wQeLg5wS_c34D-7R-Ngcek13rzknyiGf9iG-tA@mail.gmail.com>
To: NTP WG <ntp@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/k0zI7OHYQUOQGHVb7VCbnNZueyE>
Subject: [Ntp] NTPv5 KISS code support
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: Wed, 01 Nov 2023 14:38:00 -0000

Hi All,

I have made a pull request with suggested wording for including kiss
code support in ntpv5. The PR can be found
athttps://github.com/mlichvar/draft-ntp-ntpv5/pull/9, the suggested
patch is also included below for completeness. Please do share any
feedback regarding the chosen design, this looked good to me but there
may be better approaches.

Kind regards,
David Venhoek

diff --git a/ntp-ntpv5.xml b/ntp-ntpv5.xml
index 190ab3b..0763f1b 100644
--- a/ntp-ntpv5.xml
+++ b/ntp-ntpv5.xml
@@ -310,6 +310,11 @@
                 In requests a value of 1 is a request for a response in the
                 interleaved mode. In responses a value of 1 indicates the
                 response is in the interleaved mode.</t>
+              <t hangText="0x4: Status message"><vspace/>
+                In requests it is 0. In responses a value of 1 indicates that
+                the response is not a normal time-providing response, and MUST
+                be interpreted according to the clauses in Section <xref
+                format="counter" target="status-message"/></t>
             </list>
           </t>

@@ -354,6 +359,24 @@
         by 4.</t>
     </section>

+    <section title="Status messages" anchor="status-message">
+      <t>Instead of a normal time response, a server may send a
status message by
+        setting the 0x4 flag in the flag field. In such messages, the
timestamps,
+        delay, dispersion, precision and leap indicator header fields SHOULD be
+        sent as 0 by the server, and the client MUST ignore these fields.</t>
+
+      <t>In a status message, the server should populate the first 4
bytes of the
+        Server Cookie header with an NTP kiss of death code. Specifications for
+        such codes MAY change the interpretation of the Era, Poll,
and Timescale
+        header fields.</t>
+
+      <t> Clients MUST support at least the RSTR, DENY and RATE kiss
of death codes.
+        For a RSTR or DENY kiss of death code a client MUST
immediately stop sending
+        further messages to the server. For a RATE kiss of death
code, the client
+        MUST immediately change it message sending rate to send at
most 1 message
+        every interval indicated by the Poll header field.</t>
+    </section>
+
     <section title="Extension Fields">
       <t>The format of NTPv5 extension fields is shown in Figure <xref
           format="counter" target="extension-field"/>.</t>