+2000-05-10 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.99i9
+
+ * ntpd/ntp_crypto.c: tstamp and autokey cleanup
+ From: Dave Mills
+
+ * ntpd/ntp_proto.c (clock_update): Only call expire_all() if
+ AUTOKEY
+ From many folks, including Reg Clemens <reg@dwf.com>
+
2000-05-07 Harlan Stenn <stenn@whimsy.udel.edu>
+ * configure.in: 4.0.99i8
+
* flock-build: Use new --with-crypto choices
* build (KEYSUF): Deal with new --with-crypto
* configure.in: --with-crypto={md5,autokey,rsaref};
PACKAGE=ntp
-VERSION=4.0.99i7
+VERSION=4.0.99i9
if test "`CDPATH=: && cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
AC_DEFINE_UNQUOTED(STR_SYSTEM, "$target")
AM_CONFIG_HEADER(config.h)
AC_ARG_PROGRAM
-AM_INIT_AUTOMAKE(ntp, 4.0.99i7)
+AM_INIT_AUTOMAKE(ntp, 4.0.99i9)
AC_PREREQ(2.14)
ac_cv_var_oncore_ok=no
temp = public_key.bits / 8;
if (!crypto_enable) {
rval = 0;
- } else if (tstamp < peer->recauto.tstamp) {
+ } else if (tstamp == 0 || tstamp <
+ peer->recauto.tstamp) {
break;
} else if (peer->pubkey == NULL || temp !=
ntohl(ap->siglen)) {
peer->flags &= ~FLAG_AUTOKEY;
break;
}
- if (tstamp > 0)
- peer->flags |= FLAG_AUTOKEY;
+ peer->flags |= FLAG_AUTOKEY;
#endif /* PUBKEY */
peer->flash &= ~TEST10;
peer->recauto.tstamp = tstamp;
temp = public_key.bits / 8;
if (!crypto_enable) {
rval = 0;
- } else if (tstamp < peer->pcookie.tstamp) {
+ } else if (tstamp == 0 || tstamp <
+ peer->pcookie.tstamp) {
break;
} else if (peer->pubkey == NULL || temp !=
ntohl(cp->siglen)) {
peer->flags &= ~FLAG_AUTOKEY;
break;
}
- if (!(peer->flags & FLAG_MCAST2) && tstamp > 0)
+ if (!(peer->flags & FLAG_MCAST2))
peer->flags |= FLAG_AUTOKEY;
#else
temp = ntohl(cp->key);
case CRYPTO_DH | CRYPTO_RESP:
temp = ntohl(pkt[i + 3]);
j = i + 4 + temp / 4;
- if (tstamp < peer->pcookie.tstamp) {
+ if (tstamp == 0 || tstamp <
+ peer->pcookie.tstamp) {
break;
} else if (peer->pubkey == NULL ||
ntohl(pkt[j]) != public_key.bits / 8) {
case CRYPTO_NAME | CRYPTO_RESP:
temp = ntohl(pkt[i + 3]);
j = i + 4 + temp / 4;
- if (tstamp < peer->pcookie.tstamp) {
+ if (tstamp == 0 || tstamp <
+ peer->pcookie.tstamp) {
break;
} else if (ntohl(pkt[j]) != public_key.bits / 8)
{
&rbufp->recv_srcadr,
&rbufp->dstadr->sin, 0, sys_private,
0);
- } else if (hismode == MODE_CLIENT) {
- pkeyid = peer->hcookie;
} else {
#ifdef PUBKEY
- if (crypto_enable)
- pkeyid = peer->pcookie.key;
- else
- pkeyid = peer->pcookie.key;
-
+ pkeyid = peer->pcookie.key;
#else
if (hismode == MODE_SERVER)
pkeyid = peer->pcookie.key;
* 4. Check to see that one or more hashes of the current key ID
* matches the previous key ID or ultimate original key ID
* obtained from the broadcaster or symmetric peer. If no
- * match, arm for an autokey values update.
+ * match, sit the dance and wait for timeout.
*/
if (peer->flags & FLAG_SKEY) {
peer->flash |= TEST10;
}
if (oleap == LEAP_NOTINSYNC) {
report_event(EVNT_SYNCCHG, (struct peer *)0);
+#ifdef AUTOKEY
expire_all();
+#endif
}
if (ostratum != sys_stratum)
report_event(EVNT_PEERSTCHG, (struct peer *)0);