From 54ea2da967ec698601f1cd9cd7e557ef07848e8c Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sat, 6 Dec 2003 21:16:41 +0000 Subject: [PATCH] in MOTD if server ID not found on router, it's bogus. --- apps/silcd/command_reply.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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, -- 2.43.0