Blame SOURCES/ntp-4.2.6p5-xleap.patch

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

The Configuration File

fcbf71
 		

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.

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