From: Pekka Riikonen Date: Sat, 6 Dec 2003 21:16:41 +0000 (+0000) Subject: in MOTD if server ID not found on router, it's bogus. X-Git-Tag: silc.server.0.9.16~20 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=54ea2da967ec698601f1cd9cd7e557ef07848e8c in MOTD if server ID not found on router, it's bogus. --- diff --git a/apps/silcd/command_reply.c b/apps/silcd/command_reply.c index cfcd8b4b..3f895f99 100644 --- a/apps/silcd/command_reply.c +++ b/apps/silcd/command_reply.c @@ -886,10 +886,16 @@ SILC_SERVER_CMD_REPLY_FUNC(motd) entry = silc_idlist_find_server_by_id(server->global_list, server_id, TRUE, NULL); if (!entry) { - /* entry isn't known so we IDENTIFY it. otherwise the - * silc_server_command_motd won't know about it and tell - * the client that there is no such server */ SilcBuffer buffer; + + /* If router did not find such Server ID in its lists then this must + be bogus client or some router in the net is buggy. */ + if (server->server_type != SILC_SERVER) + goto out; + + /* entry isn't known so we IDENTIFY it. otherwise the + silc_server_command_motd won't know about it and tell + the client that there is no such server */ buffer = silc_command_payload_encode_va(SILC_COMMAND_IDENTIFY, ++server->cmd_ident, 5, 1, NULL, 0, 2, NULL, 0,