From: Harlan Stenn Date: Sat, 21 Apr 2001 01:55:49 +0000 (-0000) Subject: ChangeLog, ntp_crypto.c, ntp_loopfilter.c, ntp_peer.c, ntp_proto.c: X-Git-Tag: NTP_4_0_99_M~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=810a84443ea020dabc11003a22969e883afcf5ce;p=thirdparty%2Fntp.git ChangeLog, ntp_crypto.c, ntp_loopfilter.c, ntp_peer.c, ntp_proto.c: * ntpd/ntp_proto.c (receive): In the AM_NEWBCL case, return in all cases at the end. * ntpd/ntp_peer.c (newpeer): Check cast_flags against MDF_BCLNT, not against MDF_BCAST. * ntpd/ntp_loopfilter.c (local_clock): Lose debug info. * ntpd/ntp_crypto.c (crypto_recv): Bugfix. From: Dave Mills. bk: 3ae0e8a5AlEUqt37dFS5FP1rb-3wWA --- diff --git a/ChangeLog b/ChangeLog index 3eebfbea0b..27fc62e908 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2001-04-20 Harlan Stenn + * ntpd/ntp_proto.c (receive): In the AM_NEWBCL case, return in all + cases at the end. + * ntpd/ntp_peer.c (newpeer): Check cast_flags against MDF_BCLNT, + not against MDF_BCAST. + * ntpd/ntp_loopfilter.c (local_clock): Lose debug info. + * ntpd/ntp_crypto.c (crypto_recv): Bugfix. + From: Dave Mills. + * configure.in: 4.0.99k27 * ntpd/ntp_loopfilter.c (local_clock): Check clock_panic > 0. diff --git a/ntpd/ntp_crypto.c b/ntpd/ntp_crypto.c index a01869de59..d8516b5ebb 100644 --- a/ntpd/ntp_crypto.c +++ b/ntpd/ntp_crypto.c @@ -384,10 +384,9 @@ crypto_recv( rval = RV_LEN; } else if (tstamp == 0) { rval = RV_TSP; - } else if (peer->crypto) { - rval = RV_DUP; } else { - peer->crypto = temp; + if (!peer->crypto) + peer->crypto = temp; if (ntohl(pkt[i + 1]) != 0) peer->assoc = ntohl(pkt[i + 1]); rval = RV_OK; diff --git a/ntpd/ntp_loopfilter.c b/ntpd/ntp_loopfilter.c index 0683ce017e..64aac8753c 100644 --- a/ntpd/ntp_loopfilter.c +++ b/ntpd/ntp_loopfilter.c @@ -599,9 +599,6 @@ local_clock( clock_stability = SQRT(dtemp + etemp / CLOCK_AVG); allan_xpt = max(CLOCK_ALLAN, clock_stability * CLOCK_ADF); -printf("xxx %.3f %.3f\n", sys_jitter / ULOGTOD(sys_poll + 1) * 1e6, -clock_stability * 1.5 * 1e6); - /* * In SYNC state, adjust the poll interval. */ diff --git a/ntpd/ntp_peer.c b/ntpd/ntp_peer.c index 6dc6ac2971..b1641817f1 100644 --- a/ntpd/ntp_peer.c +++ b/ntpd/ntp_peer.c @@ -530,10 +530,10 @@ newpeer( */ if (ISREFCLOCKADR(srcadr)) peer->dstadr = loopback_interface; + else if (cast_flags & MDF_BCLNT) + peer->dstadr = findbcastinter(srcadr); else if (dstadr != any_interface) peer->dstadr = dstadr; - else if (cast_flags & MDF_BCAST) - peer->dstadr = findbcastinter(srcadr); else peer->dstadr = findinterface(srcadr); peer->srcadr = *srcadr; diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c index 0cc7ebc991..7a487d2e79 100644 --- a/ntpd/ntp_proto.c +++ b/ntpd/ntp_proto.c @@ -674,9 +674,7 @@ receive( sys_minpoll, NTP_MAXDPOLL, FLAG_MCAST | FLAG_IBURST | (sys_authenticate ? FLAG_AUTHENABLE : 0), MDF_BCLNT, 0, skeyid); - if (peer == NULL) - return; - break; + return; case AM_POSSBCL: case AM_PROCPKT: