[ntp:bk-ntp-dev-send] BitKeeper diffs

Harlan Stenn stenn at deacon.udel.edu
Fri Dec 9 18:37:59 UTC 2011


#### ChangeSet ####
2011-12-07 23:17:43+00:00, davehart at shiny.ad.hartbrothers.com
  Correct ChangeLog merge to duplicate -stable entries in -dev section.

==== ChangeLog ====
2011-12-07 23:17:42+00:00, davehart at shiny.ad.hartbrothers.com +6 -0
  Correct ChangeLog merge to duplicate -stable entries in -dev section.

--- 1.1067/ChangeLog	2011-12-07 17:57:37 -05:00
+++ 1.1068/ChangeLog	2011-12-07 18:17:42 -05:00
@@ -1,5 +1,11 @@
 * [Bug 2082] from 4.2.6p5-RC3: 3-char refid sent by ntpd 4.2.6p5-RC2
   ends with extra dot.
+* [Bug 2085] from 4.2.6p5-RC3: clock_update() sys_rootdisp calculation
+  omits root delay.
+* [Bug 2086] from 4.2.6p5-RC3: get_systime() should not offset by
+  sys_residual.
+* [Bug 2087] from 4.2.6p5-RC3: sys_jitter calculation overweights
+  sys.peer jitter.
 * from 4.2.6p5-RC3: Ensure NULL peer->dstadr is not accessed in orphan
   parent selection.
 (4.2.7p237) 2011/12/01 Released by Harlan Stenn <stenn at ntp.org>

#### ChangeSet ####
2011-12-07 22:28:13+00:00, davehart at shiny.ad.hartbrothers.com
  [Bug 2087] sys_jitter calculation overweights sys.peer jitter.

==== ChangeLog ====
2011-12-07 22:28:12+00:00, davehart at shiny.ad.hartbrothers.com +1 -0
  [Bug 2087] sys_jitter calculation overweights sys.peer jitter.

--- 1.496.26.182/ChangeLog	2011-12-07 17:24:25 -05:00
+++ 1.496.26.183/ChangeLog	2011-12-07 17:28:12 -05:00
@@ -3,6 +3,7 @@
 * [Bug 2082] 3-char refid sent by ntpd 4.2.6p5-RC2 ends with extra dot.
 * [Bug 2085] clock_update() sys_rootdisp calculation omits root delay.
 * [Bug 2086] get_systime() should not offset by sys_residual.
+* [Bug 2087] sys_jitter calculation overweights sys.peer jitter.
 * Ensure NULL peer->dstadr is not accessed in orphan parent selection.
 
 ---

==== ntpd/ntp_proto.c ====
2011-12-07 22:28:12+00:00, davehart at shiny.ad.hartbrothers.com +2 -2
  [Bug 2087] sys_jitter calculation overweights sys.peer jitter.

--- 1.297.2.9/ntpd/ntp_proto.c	2011-12-07 17:21:40 -05:00
+++ 1.297.2.10/ntpd/ntp_proto.c	2011-12-07 17:28:12 -05:00
@@ -2699,8 +2699,8 @@ clock_select(void)
 		if (sys_prefer == NULL) {
 			typesystem->new_status = CTL_PST_SEL_SYSPEER;
 			clock_combine(peer_list, sys_survivors);
-			sys_jitter = SQRT(SQUARE(typesystem->jitter) +
-			    SQUARE(sys_jitter) + SQUARE(seljitter));
+			sys_jitter = SQRT(SQUARE(sys_jitter) +
+			    SQUARE(seljitter));
 		} else {
 			typesystem = sys_prefer;
 			sys_clockhop = 0;

#### ChangeSet ####
2011-12-07 22:24:26+00:00, davehart at shiny.ad.hartbrothers.com
  [Bug 2086] get_systime() should not offset by sys_residual.

==== ChangeLog ====
2011-12-07 22:24:25+00:00, davehart at shiny.ad.hartbrothers.com +1 -0
  [Bug 2086] get_systime() should not offset by sys_residual.

--- 1.496.26.181/ChangeLog	2011-12-07 17:21:40 -05:00
+++ 1.496.26.182/ChangeLog	2011-12-07 17:24:25 -05:00
@@ -2,6 +2,7 @@
 
 * [Bug 2082] 3-char refid sent by ntpd 4.2.6p5-RC2 ends with extra dot.
 * [Bug 2085] clock_update() sys_rootdisp calculation omits root delay.
+* [Bug 2086] get_systime() should not offset by sys_residual.
 * Ensure NULL peer->dstadr is not accessed in orphan parent selection.
 
 ---

==== libntp/systime.c ====
2011-12-07 22:24:25+00:00, davehart at shiny.ad.hartbrothers.com +2 -2
  [Bug 2086] get_systime() should not offset by sys_residual.

--- 1.48/libntp/systime.c	2009-09-15 01:26:13 -04:00
+++ 1.48.1.1/libntp/systime.c	2011-12-07 17:24:25 -05:00
@@ -81,7 +81,7 @@ get_systime(
 		dtemp = ntp_random() * 2. / FRAC * sys_tick * 1e9;
 	else if (sys_tick > 0)
 		dtemp = ntp_random() * 2. / FRAC;
-	dtemp = (ts.tv_nsec + dtemp) * 1e-9 + sys_residual;
+	dtemp = (ts.tv_nsec + dtemp) * 1e-9;
 	if (dtemp >= 1.) {
 		dtemp -= 1.;
 		now->l_i++;
@@ -105,7 +105,7 @@ get_systime(
 		dtemp = ntp_random() * 2. / FRAC * sys_tick * 1e6;
 	else if (sys_tick > 0)
 		dtemp = ntp_random() * 2. / FRAC;
-	dtemp = (tv.tv_usec + dtemp) * 1e-6 + sys_residual;
+	dtemp = (tv.tv_usec + dtemp) * 1e-6;
 	if (dtemp >= 1.) {
 		dtemp -= 1.;
 		now->l_i++;

#### ChangeSet ####
2011-12-07 22:21:41+00:00, davehart at shiny.ad.hartbrothers.com
  [Bug 2085] clock_update() sys_rootdisp calculation omits root delay.

==== ChangeLog ====
2011-12-07 22:21:40+00:00, davehart at shiny.ad.hartbrothers.com +1 -0
  [Bug 2085] clock_update() sys_rootdisp calculation omits root delay.

--- 1.496.26.180/ChangeLog	2011-12-05 12:07:39 -05:00
+++ 1.496.26.181/ChangeLog	2011-12-07 17:21:40 -05:00
@@ -1,6 +1,7 @@
 ---
 
 * [Bug 2082] 3-char refid sent by ntpd 4.2.6p5-RC2 ends with extra dot.
+* [Bug 2085] clock_update() sys_rootdisp calculation omits root delay.
 * Ensure NULL peer->dstadr is not accessed in orphan parent selection.
 
 ---

==== ntpd/ntp_proto.c ====
2011-12-07 22:21:40+00:00, davehart at shiny.ad.hartbrothers.com +2 -1
  [Bug 2085] clock_update() sys_rootdisp calculation omits root delay.

--- 1.297.2.8/ntpd/ntp_proto.c	2011-12-05 12:07:39 -05:00
+++ 1.297.2.9/ntpd/ntp_proto.c	2011-12-07 17:21:40 -05:00
@@ -1667,7 +1667,8 @@ clock_update(
 		sys_refid = peer->refid;
 	else
 		sys_refid = addr2refid(&peer->srcadr);
-	dtemp = sys_jitter + fabs(sys_offset) + peer->disp + clock_phi *
+	dtemp = sys_jitter + fabs(sys_offset) + peer->disp +
+	    (peer->delay + peer->rootdelay) / 2 + clock_phi *
 	    (current_time - peer->update);
 	sys_rootdisp = dtemp + peer->rootdisp;
 	sys_rootdelay = peer->delay + peer->rootdelay;

#### ChangeSet ####
2011-12-05 17:07:40+00:00, davehart at shiny.ad.hartbrothers.com
  [Bug 2082] 3-char refid sent by ntpd 4.2.6p5-RC2 ends with extra dot.
  Ensure NULL peer->dstadr is not accessed in orphan parent selection.

==== ChangeLog ====
2011-12-05 17:07:39+00:00, davehart at shiny.ad.hartbrothers.com +5 -0
  [Bug 2082] 3-char refid sent by ntpd 4.2.6p5-RC2 ends with extra dot.
  Ensure NULL peer->dstadr is not accessed in orphan parent selection.

--- 1.496.26.179/ChangeLog	2011-11-30 22:06:38 -05:00
+++ 1.496.26.180/ChangeLog	2011-12-05 12:07:39 -05:00
@@ -1,4 +1,9 @@
 ---
+
+* [Bug 2082] 3-char refid sent by ntpd 4.2.6p5-RC2 ends with extra dot.
+* Ensure NULL peer->dstadr is not accessed in orphan parent selection.
+
+---
 (4.2.6p5-RC2) 2011/11/30 Released by Harlan Stenn <stenn at ntp.org>
 
 * [Bug 2050] Orphan mode stratum counting to infinity.

==== ntpd/ntp_control.c ====
2011-12-05 17:07:39+00:00, davehart at shiny.ad.hartbrothers.com +2 -1
  [Bug 2082] 3-char refid sent by ntpd 4.2.6p5-RC2 ends with extra dot.

--- 1.129.1.7/ntpd/ntp_control.c	2011-11-25 05:23:56 -05:00
+++ 1.129.1.8/ntpd/ntp_control.c	2011-12-05 12:07:39 -05:00
@@ -1283,7 +1283,8 @@ ctl_putrefid(
 		return;
 	iptr = (char *)&refid;
 	iplim = iptr + sizeof(refid);
-	for (; optr < oplim && iptr < iplim; iptr++, optr++)
+	for ( ; optr < oplim && iptr < iplim && '\0' != *iptr; 
+	     iptr++, optr++)
 		if (isprint(*iptr))
 			*optr = *iptr;
 		else

==== ntpd/ntp_proto.c ====
2011-12-05 17:07:39+00:00, davehart at shiny.ad.hartbrothers.com +4 -1
  Ensure NULL peer->dstadr is not accessed in orphan parent selection.

--- 1.297.2.7/ntpd/ntp_proto.c	2011-11-29 08:33:59 -05:00
+++ 1.297.2.8/ntpd/ntp_proto.c	2011-12-05 12:07:39 -05:00
@@ -2311,7 +2311,10 @@ clock_select(void)
 				u_int32	localmet;
 				u_int32	peermet;
 
-				localmet = ntohl(peer->dstadr->addr_refid);
+				if (peer->dstadr != NULL)
+					localmet = ntohl(peer->dstadr->addr_refid);
+				else
+					localmet = U_INT32_MAX;
 				peermet = ntohl(addr2refid(&peer->srcadr));
 				if (peermet < localmet &&
 				    peermet < orphmet) {


More information about the bk-ntp-dev-send mailing list