From owner-svn-src-head@freebsd.org Sat Oct 17 21:20:42 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2489A1764E; Sat, 17 Oct 2015 21:20:42 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [IPv6:2001:770:10:300::86e2:510b]) by mx1.freebsd.org (Postfix) with ESMTP id 6FAC3ECF; Sat, 17 Oct 2015 21:20:42 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (localhost [127.0.0.1]) by salmon.maths.tcd.ie (Postfix) with ESMTP id 1B2F71591E1; Sat, 17 Oct 2015 22:20:40 +0100 (IST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=maths.tcd.ie; h= user-agent:in-reply-to:content-disposition:content-type :content-type:mime-version:references:message-id:subject:subject :from:from:date:date:received:received:received; s=20150418; t= 1445116834; x=1446931235; bh=tPbA0FlI+LERq8fMn+IBo7vCmw0CYmjJNSv wpREV6rY=; b=TNylZYbTGS2p6jfGMRVPe+UwbVg+OHml6LKYMyoxeMJD/eCFwQc YlALmEtBJSfLCXloisxsTGfACV+Fxa1u9SdZ2btguOsZUedVNdu9+s+wrLXdSEel POE53oN3JoRFqAC9yDlgpPnaEKW4SdPD5NFr7ZD8XIWWSmo5EgGSMl1I= X-Virus-Scanned: amavisd-new at maths.tcd.ie Received: from salmon.maths.tcd.ie ([127.0.0.1]) by salmon.maths.tcd.ie (salmon.maths.tcd.ie [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NkFcabDtMXdD; Sat, 17 Oct 2015 22:20:34 +0100 (IST) Received: from walton.maths.tcd.ie (walton.maths.tcd.ie [IPv6:2001:770:10:300::86e2:510a]) by salmon.maths.tcd.ie (Postfix) with ESMTP id D7CAE1591E0; Sat, 17 Oct 2015 22:20:33 +0100 (IST) Received: by walton.maths.tcd.ie (Postfix, from userid 238) id 6732B730AA; Sat, 17 Oct 2015 22:20:33 +0100 (IST) Date: Sat, 17 Oct 2015 22:20:33 +0100 From: David Malone To: Ian Lepore Cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp Message-ID: <20151017212033.GA43955@walton.maths.tcd.ie> References: <201510161404.t9GE4GqM046436@repo.freebsd.org> <1445106350.71631.36.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1445106350.71631.36.camel@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 21:20:42 -0000 On Sat, Oct 17, 2015 at 12:25:50PM -0600, Ian Lepore wrote: > If the leapseconds file is present, the leap bits for reference > clocks and downstratum servers are ignored. > > I can't determine from casual code examination (and I don't have time > to experiment now) whether that is true even if the file is expired. The way the code seems to work is: 1) Take a vote from your peers on if there is an upcoming leap second. Refclocks can outvote other peers. (This is in ntp_proto.c:clock_update() - search for leap_vote_ins). 2) If one seems to be pending, try to insert it into an in-memory table for the end of the month. 3) If you find that you loaded a table and the leapsecond you are trying to insert is within the valid range of the table, return an error. (This is in ntp_leapsec.c:leapsec_add()) So, I think the change should be safe, if the comments match the code. David.