Re: [Ntp] Leap second

Hal Murray <hmurray@megapathdsl.net> Thu, 23 January 2020 23:52 UTC

Return-Path: <hmurray@megapathdsl.net>
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 87AFC1200CD for <ntp@ietfa.amsl.com>; Thu, 23 Jan 2020 15:52:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.134
X-Spam-Level: *
X-Spam-Status: No, score=1.134 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HDRS_LCASE=0.099, HELO_DYNAMIC_IPADDR=1.951, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=no autolearn_force=no
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 B2LgJ11as_X6 for <ntp@ietfa.amsl.com>; Thu, 23 Jan 2020 15:52:33 -0800 (PST)
Received: from ip-64-139-1-69.sjc.megapath.net (ip-64-139-1-69.sjc.megapath.net [64.139.1.69]) by ietfa.amsl.com (Postfix) with ESMTP id A722A120091 for <ntp@ietf.org>; Thu, 23 Jan 2020 15:52:33 -0800 (PST)
Received: from shuksan (localhost [127.0.0.1]) by ip-64-139-1-69.sjc.megapath.net (Postfix) with ESMTP id BB54440605C; Thu, 23 Jan 2020 15:52:32 -0800 (PST)
X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3
To: NTP WG <ntp@ietf.org>
cc: Hal Murray <hmurray@megapathdsl.net>
From: Hal Murray <hmurray@megapathdsl.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Thu, 23 Jan 2020 15:52:32 -0800
Message-Id: <20200123235232.BB54440605C@ip-64-139-1-69.sjc.megapath.net>
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/nxcn-47Q72TrrQa9AcyIeg0mzfE>
Subject: Re: [Ntp] Leap second
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <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: Thu, 23 Jan 2020 23:52:35 -0000

Warner Losh said:
> NTP timestamp repeats the last second of the day. Once without the leap bit
> set and then again with it set. 

Which bit is that?  I don't know of a single "leap bit" in the header.

There is a 2 bit header field with: normal (no leap), and add+del (leap 
pending) states.  The 4th state is used for non-in-sync.  Assuming you meant 
"bits" rather than bit, then the on-off is backwards.  I expect it to be 
sending leap-pending for most of the day, then send normal (no leap-pending) 
for the repeated last second of the day.

--------

I just looked at some code and found:
                if (leap_sec_in_progress) {
                        /* always send "not sync" */
                        xmt_leap = LEAP_NOTINSYNC;
                }

Looks like it is responding with "I don't know" during the extra second. (but 
I didn't check carefully)


-- 
These are my opinions.  I hate spam.