From: Harlan Stenn Date: Thu, 11 Jul 2002 16:47:13 +0000 (-0400) Subject: Cleanup and fixes from Dave. X-Git-Tag: NTP_4_1_73~121^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c2c13a6ed31b98b59ea5c4fdf8c2624426b695ca;p=thirdparty%2Fntp.git Cleanup and fixes from Dave. bk: 3d2db691S9_aSKvTBlYTDVYo7xa4aQ --- diff --git a/ntpd/ntp_peer.c b/ntpd/ntp_peer.c index d3aaeff00b..0ac50d9255 100644 --- a/ntpd/ntp_peer.c +++ b/ntpd/ntp_peer.c @@ -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 diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c index 4bc1e48de0..43b10a5b5b 100644 --- a/ntpd/ntp_proto.c +++ b/ntpd/ntp_proto.c @@ -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;