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
* 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;
* 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;
* 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;