projects
/
silc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
159bc12
)
in MOTD if server ID not found on router, it's bogus.
author
Pekka Riikonen
<priikone@silcnet.org>
Sat, 6 Dec 2003 21:16:41 +0000
(21:16 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Sat, 6 Dec 2003 21:16:41 +0000
(21:16 +0000)
apps/silcd/command_reply.c
patch
|
blob
|
history
diff --git
a/apps/silcd/command_reply.c
b/apps/silcd/command_reply.c
index cfcd8b4b6a5513693e63c9776c9acbb9f90a8f3c..3f895f99d8bdf8e7c4a8b6022b8794edeedccd12 100644
(file)
--- 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 = 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;
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,
buffer = silc_command_payload_encode_va(SILC_COMMAND_IDENTIFY,
++server->cmd_ident, 5,
1, NULL, 0, 2, NULL, 0,