]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Cleanup and fixes from Dave.
authorHarlan Stenn <stenn@ntp.org>
Thu, 11 Jul 2002 16:47:13 +0000 (12:47 -0400)
committerHarlan Stenn <stenn@ntp.org>
Thu, 11 Jul 2002 16:47:13 +0000 (12:47 -0400)
bk: 3d2db691S9_aSKvTBlYTDVYo7xa4aQ

ntpd/ntp_peer.c
ntpd/ntp_proto.c

index d3aaeff00b7acfae208e8166f3f0a0f45cc86e2b..0ac50d9255eb59622556a0f5519c718593e4f08f 100644 (file)
@@ -312,7 +312,10 @@ clear_all(void)
        for (n = 0; n < HASH_SIZE; n++) {
                for (peer = peer_hash[n]; peer != 0; peer = next_peer) {
                        next_peer = peer->next;
-                       peer_clear(peer);
+                       if (peer->flags & FLAG_CONFIG)
+                               peer_clear(peer);
+                       else
+                               unpeer(peer);
                }
        }
 #ifdef DEBUG
index 4bc1e48de05bbc6b7518807b7e84defe237ce8b2..43b10a5b5be1a73246e701d02b5ec6adc298c4d2 100644 (file)
@@ -643,9 +643,10 @@ receive(
                 * immediately. If the guy is already here, don't fire
                 * up a duplicate.
                 */
-               if (restrict_mask & (RES_DONTTRUST | RES_NOPEER))
+               if (restrict_mask & (RES_DONTTRUST | RES_NOPEER)) {
                        sys_restricted++;
                        return;
+               }
 
                if (sys_authenticate && !is_authentic)
                        return;
@@ -675,9 +676,10 @@ receive(
                 * If authentication fails send a crypto-NAK; otherwise,
                 * kiss the frog.
                 */
-               if (restrict_mask & (RES_DONTTRUST | RES_NOPEER))
+               if (restrict_mask & (RES_DONTTRUST | RES_NOPEER)) {
                        sys_restricted++;
                        return;
+               }
 
                if (sys_authenticate && !is_authentic)
                        return;
@@ -699,9 +701,10 @@ receive(
                 * mobilize a broadcast client association. We don't
                 * kiss any frogs here.
                 */
-               if (restrict_mask & (RES_DONTTRUST | RES_NOPEER))
+               if (restrict_mask & (RES_DONTTRUST | RES_NOPEER)) {
                        sys_restricted++;
                        return;
+               }
 
                if ((sys_authenticate && !is_authentic) || !sys_bclient)
                        return;