Blame SOURCES/ntp-4.2.6p5-xleap.patch

6e16f6
diff -up ntp-4.2.6p5/html/miscopt.html.xleap ntp-4.2.6p5/html/miscopt.html
6e16f6
--- ntp-4.2.6p5/html/miscopt.html.xleap	2009-12-09 08:36:36.000000000 +0100
6e16f6
+++ ntp-4.2.6p5/html/miscopt.html	2015-02-18 13:36:42.245273922 +0100
6e16f6
@@ -88,7 +88,7 @@
6e16f6
 						is 0.128 s. If set to zero, step adjustments will never
6e16f6
 						occur. Note: The kernel time discipline is disabled if
6e16f6
 						the step threshold is set to zero or greater than 0.5
6e16f6
-						s.
6e16f6
+						s and the threshold is applied also to leap second corrections.
6e16f6
 					
<tt>stepout stepout</tt>
6e16f6
 					
Specifies the stepout threshold in seconds. The default without this
6e16f6
 						command is 900 s.  If set to zero, popcorn spikes will
6e16f6
diff -up ntp-4.2.6p5/html/ntpd.html.xleap ntp-4.2.6p5/html/ntpd.html
6e16f6
--- ntp-4.2.6p5/html/ntpd.html.xleap	2015-02-18 13:24:29.489697158 +0100
6e16f6
+++ ntp-4.2.6p5/html/ntpd.html	2015-02-18 13:34:46.296031098 +0100
6e16f6
@@ -146,7 +146,7 @@
6e16f6
 			
<tt>-U interface update interval</tt>
6e16f6
 			
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.
6e16f6
 			
<tt>-x</tt>
6e16f6
-			
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.
6e16f6
+			
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.
6e16f6
 	
6e16f6
 		

The Configuration File

6e16f6
 		

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.

6e16f6
diff -up ntp-4.2.6p5/ntpd/ntp_timer.c.xleap ntp-4.2.6p5/ntpd/ntp_timer.c
6e16f6
--- ntp-4.2.6p5/ntpd/ntp_timer.c.xleap	2015-04-21 18:16:08.255535621 +0200
6e16f6
+++ ntp-4.2.6p5/ntpd/ntp_timer.c	2015-04-21 18:16:30.463601752 +0200
6e16f6
@@ -449,8 +449,14 @@ timer(void)
6e16f6
 			sys_leap = LEAP_NOWARNING;
6e16f6
 			sys_tai = leap_tai;
6e16f6
 #ifdef KERNEL_PLL
6e16f6
-			if (!(pll_control && kern_enable))
6e16f6
-				step_systime(-1.0);
6e16f6
+			if (!pll_control || !kern_enable) {
6e16f6
+				if (clock_max < 1.0 && clock_max > 0.0) {
6e16f6
+					step_systime(-1.0);
6e16f6
+					msyslog(LOG_NOTICE, "Inserting positive leap second");
6e16f6
+				} else {
6e16f6
+					msyslog(LOG_NOTICE, "Ignoring leap second");
6e16f6
+				}
6e16f6
+			}
6e16f6
 #else /* KERNEL_PLL */
6e16f6
 #ifndef SYS_WINNT /* WinNT port has its own leap second handling */
6e16f6
 			step_systime(-1.0);