Blob Blame History Raw
diff -up ntp-4.2.6p5/html/miscopt.html.xleap ntp-4.2.6p5/html/miscopt.html
--- ntp-4.2.6p5/html/miscopt.html.xleap	2009-12-09 08:36:36.000000000 +0100
+++ ntp-4.2.6p5/html/miscopt.html	2015-02-18 13:36:42.245273922 +0100
@@ -88,7 +88,7 @@
 						is 0.128 s. If set to zero, step adjustments will never
 						occur. Note: The kernel time discipline is disabled if
 						the step threshold is set to zero or greater than 0.5
-						s.</dd>
+						s and the threshold is applied also to leap second corrections.</dd>
 					<dt><tt>stepout <i>stepout</i></tt></dt>
 					<dd>Specifies the stepout threshold in seconds. The default without this
 						command is 900 s.  If set to zero, popcorn spikes will
diff -up ntp-4.2.6p5/html/ntpd.html.xleap ntp-4.2.6p5/html/ntpd.html
--- ntp-4.2.6p5/html/ntpd.html.xleap	2015-02-18 13:24:29.489697158 +0100
+++ ntp-4.2.6p5/html/ntpd.html	2015-02-18 13:34:46.296031098 +0100
@@ -146,7 +146,7 @@
 			<dt><tt>-U <i>interface update interval</i></tt></dt>
 			<dd>Number of seconds to wait between interface list scans to pick up new and delete network interface. Set to 0 to disable dynamic interface list updating. The default is to scan every 5 minutes.</dd>
 			<dt><tt>-x</tt></dt>
-			<dd>Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold. This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually. Note: Since the slew rate of typical Unix kernels is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s. Thus, an adjustment as much as 600 s will take almost 14 days to complete. This option can be used with the <tt>-g</tt> and <tt>-q</tt> options. See the <tt>tinker</tt> command for other options. Note: The kernel time discipline is disabled with this option.</dd>
+			<dd>Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold. This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually. Note: Since the slew rate of typical Unix kernels is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s. Thus, an adjustment as much as 600 s will take almost 14 days to complete. This option can be used with the <tt>-g</tt> and <tt>-q</tt> options. See the <tt>tinker</tt> command for other options. Note: The kernel time discipline is disabled with this option and the step threshold is applied also to leap second corrections.</dd>
 	</dl>
 		<h4 id="cfg">The Configuration File</h4>
 		<p>Ordinarily, <tt>ntpd</tt> reads the <tt>ntp.conf</tt> configuration file at startup in order to determine the synchronization sources and operating modes. It is also possible to specify a working, although limited, configuration entirely on the command line, obviating the need for a configuration file. This may be particularly useful when the local host is to be configured as a broadcast client, with servers determined by listening to broadcasts at run time.</p>
diff -up ntp-4.2.6p5/ntpd/ntp_timer.c.xleap ntp-4.2.6p5/ntpd/ntp_timer.c
--- ntp-4.2.6p5/ntpd/ntp_timer.c.xleap	2015-04-21 18:16:08.255535621 +0200
+++ ntp-4.2.6p5/ntpd/ntp_timer.c	2015-04-21 18:16:30.463601752 +0200
@@ -449,8 +449,14 @@ timer(void)
 			sys_leap = LEAP_NOWARNING;
 			sys_tai = leap_tai;
 #ifdef KERNEL_PLL
-			if (!(pll_control && kern_enable))
-				step_systime(-1.0);
+			if (!pll_control || !kern_enable) {
+				if (clock_max < 1.0 && clock_max > 0.0) {
+					step_systime(-1.0);
+					msyslog(LOG_NOTICE, "Inserting positive leap second");
+				} else {
+					msyslog(LOG_NOTICE, "Ignoring leap second");
+				}
+			}
 #else /* KERNEL_PLL */
 #ifndef SYS_WINNT /* WinNT port has its own leap second handling */
 			step_systime(-1.0);