]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
ChangeLog, configure, configure.in, ntp_crypto.c, ntp_proto.c:
authorHarlan Stenn <stenn@ntp.org>
Wed, 10 May 2000 23:19:30 +0000 (23:19 -0000)
committerHarlan Stenn <stenn@ntp.org>
Wed, 10 May 2000 23:19:30 +0000 (23:19 -0000)
  * 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>

bk: 3919ee823auVgbbwZl-0i3mze9Btzg

ChangeLog
configure
configure.in
ntpd/ntp_crypto.c
ntpd/ntp_proto.c

index f1ed56655476f3fa95112958921769638541e24c..09565c72becb4958b6761fdb3610ef1de7cc2d25 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
+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};
index de95c29678ed0ec3569c7b57e39e3300180d81b0..9988a48aef9b68fc0b7698179230dc46475767f8 100755 (executable)
--- a/configure
+++ b/configure
@@ -1089,7 +1089,7 @@ fi
 
 PACKAGE=ntp
 
-VERSION=4.0.99i7
+VERSION=4.0.99i9
 
 if test "`CDPATH=: && cd $srcdir && pwd`" != "`pwd`" &&
    test -f $srcdir/config.status; then
index e129be52c291b6d3b07b3a6b60287fd722a98d7b..ac6c0a3a7a5e17567b689dc5a2733cac7462e589 100644 (file)
@@ -5,7 +5,7 @@ AC_CANONICAL_SYSTEM
 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
index 9ae95635fe731d4212573b0d3de9f9a18bef3097..039310e9bf25c11ee766db29530ded874271b199 100644 (file)
@@ -327,7 +327,8 @@ crypto_recv(
                        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)) {
@@ -350,8 +351,7 @@ crypto_recv(
                                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;
@@ -372,7 +372,8 @@ crypto_recv(
                        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)) {
@@ -395,7 +396,7 @@ crypto_recv(
                                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);
@@ -422,7 +423,8 @@ crypto_recv(
                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) {
@@ -479,7 +481,8 @@ crypto_recv(
                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)
                            {
index 763f2c189fe70be140424ee29e782fbb395c8121..72f79bc4cb6f08a755dcafbaa5af36a3f73bb0f0 100644 (file)
@@ -401,15 +401,9 @@ receive(
                                    &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;
@@ -704,7 +698,7 @@ receive(
         * 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;
@@ -1027,7 +1021,9 @@ clock_update(void)
        }
        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);