/*
- server.c
+ server.c
Author: Pekka Riikonen <priikone@silcnet.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
}
#endif
+ silc_server_backup_free(server);
silc_server_config_unref(&server->config_ref);
if (server->rng)
silc_rng_free(server->rng);
ret = silc_packet_parse_special(packet, idata ? idata->receive_key : NULL);
/* If entry is disabled ignore what we got. */
- if (ret != SILC_PACKET_RESUME_ROUTER &&
- idata && idata->status & SILC_IDLIST_STATUS_DISABLED) {
- SILC_LOG_DEBUG(("Connection is disabled"));
- goto out;
- }
- if (ret != SILC_PACKET_HEARTBEAT &&
- idata && idata->status & SILC_IDLIST_STATUS_DISABLED) {
+ if (idata && idata->status & SILC_IDLIST_STATUS_DISABLED &&
+ ret != SILC_PACKET_HEARTBEAT && ret != SILC_PACKET_RESUME_ROUTER &&
+ ret != SILC_PACKET_REKEY && ret != SILC_PACKET_REKEY_DONE) {
SILC_LOG_DEBUG(("Connection is disabled"));
goto out;
}
sock->type != SILC_SOCKET_TYPE_ROUTER)
backup_router = NULL;
+ if (server->server_shutdown)
+ backup_router = NULL;
+
/* If this was our primary router connection then we're lost to
the outside world. */
if (server->router == user_data) {