From: Pekka Riikonen Date: Fri, 28 Jun 2002 06:39:58 +0000 (+0000) Subject: Do not replace the primary itself backup is accidentaly found X-Git-Tag: silc.toolkit.0.9.3~9 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=d74a94942b406d551ba62e05e0fe1b41fc57fd90 Do not replace the primary itself backup is accidentaly found by some other signinoff server with same IP. --- diff --git a/apps/silcd/server.c b/apps/silcd/server.c index 4abb18cb..fb7db9d1 100644 --- a/apps/silcd/server.c +++ b/apps/silcd/server.c @@ -2976,6 +2976,11 @@ void silc_server_free_sock_user_data(SilcServer server, if (user_data->id) backup_router = silc_server_backup_get(server, user_data->id); + if (!server->backup_router && server->server_type == SILC_ROUTER && + backup_router == server->id_entry && + sock->type != SILC_SOCKET_TYPE_ROUTER) + backup_router = NULL; + /* If this was our primary router connection then we're lost to the outside world. */ if (server->router == user_data) {