+Sat Feb 3 15:44:54 EET 2001 Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+ * Oops, a little mistake in server's connection authentication
+ protocol. The protocol is not ended with FAILURE but with
+ SUCCESS if the authentication is Ok. :) Affected file is
+ silcd/protocol.c.
+
+ * Implemented NICK_CHANGE notify handling in server in the file
+ silcd/packet_receive.c The NICK_CHANGE notify is distributed to
+ the local clients on the channel. After the changing nickname
+ in router environment snhould work and the [<unknown>] nickname
+ should appear no more.
+
+ The silc_server_replace_id function that receives the Replace ID
+ payload now sends the NICK_CHANGE notify type also in the file
+ silcd/packet_receive.c
+
+ * Changed WHOIS and IDENTIFY command to support the maximum amount
+ of arguments defined in protocol specs (3328 arguments). This
+ fixed a bug that caused problems when there were more than three
+ users on a channel.
+
Fri Feb 2 11:42:56 EET 2001 Pekka Riikonen <priikone@poseidon.pspt.fi>
* Added extra parameter, command identifier, to the
that we are now re-sending. Ignored if NULL. Affected file
silcd/packet_send.[ch].
- * Added some server statistics support in sil/server_internal.h
+ * Added some server statistics support in silcd/server_internal.h
SilcServerStatistics structure and around the server code. Also
send some nice statistics information when client is connecting
to the client.
SilcServerCommandContext cmd = (SilcServerCommandContext)context;
int ret;
- SILC_SERVER_COMMAND_CHECK_ARGC(SILC_COMMAND_WHOIS, cmd, 1, 3);
+ SILC_SERVER_COMMAND_CHECK_ARGC(SILC_COMMAND_WHOIS, cmd, 1, 3328);
if (cmd->sock->type == SILC_SOCKET_TYPE_CLIENT)
ret = silc_server_command_whois_from_client(cmd);
SilcServerCommandContext cmd = (SilcServerCommandContext)context;
int ret;
- SILC_SERVER_COMMAND_CHECK_ARGC(SILC_COMMAND_IDENTIFY, cmd, 1, 3);
+ SILC_SERVER_COMMAND_CHECK_ARGC(SILC_COMMAND_IDENTIFY, cmd, 1, 3328);
if (cmd->sock->type == SILC_SOCKET_TYPE_CLIENT)
ret = silc_server_command_identify_from_client(cmd);
/* Send notify about nickname change to our router. We send the new
ID and ask to replace it with the old one. If we are router the
packet is broadcasted. */
- if (!cmd->server->standalone)
+ if (!server->standalone)
silc_server_send_replace_id(server, server->router->connection,
server->server_type == SILC_SERVER ?
FALSE : TRUE, client->id,
SilcBuffer buffer, idp;
SilcPacketContext *packet = silc_packet_context_alloc();
+ SILC_LOG_DEBUG(("Start"));
+
/* Create USERS command packet and process it. */
idp = silc_id_payload_encode(channel->id, SILC_ID_CHANNEL);
buffer = silc_command_payload_encode_va(SILC_COMMAND_USERS, 0, 1,
/* Replace the old ID */
switch(old_id_type) {
case SILC_ID_CLIENT:
- SILC_LOG_DEBUG(("Old Client ID id(%s)",
- silc_id_render(id, SILC_ID_CLIENT)));
- SILC_LOG_DEBUG(("New Client ID id(%s)",
- silc_id_render(id2, SILC_ID_CLIENT)));
- if (silc_idlist_replace_client_id(server->local_list, id, id2) == NULL)
- if (server->server_type == SILC_ROUTER)
- silc_idlist_replace_client_id(server->global_list, id, id2);
- break;
+ {
+ SilcBuffer nidp, oidp;
+ SilcClientEntry client = NULL;
+
+ SILC_LOG_DEBUG(("Old Client ID id(%s)",
+ silc_id_render(id, SILC_ID_CLIENT)));
+ SILC_LOG_DEBUG(("New Client ID id(%s)",
+ silc_id_render(id2, SILC_ID_CLIENT)));
+
+ if ((client = silc_idlist_replace_client_id(server->local_list,
+ id, id2)) == NULL)
+ if (server->server_type == SILC_ROUTER)
+ client = silc_idlist_replace_client_id(server->global_list, id, id2);
+
+ if (client) {
+ oidp = silc_id_payload_encode(id, SILC_ID_CLIENT);
+ nidp = silc_id_payload_encode(id2, SILC_ID_CLIENT);
+
+ /* Send the NICK_CHANGE notify type to local clients on the channels
+ this client is joined to. */
+ silc_server_send_notify_on_channels(server, client,
+ SILC_NOTIFY_TYPE_NICK_CHANGE, 2,
+ oidp->data, oidp->len,
+ nidp->data, nidp->len);
+
+ silc_buffer_free(nidp);
+ silc_buffer_free(oidp);
+ }
+ break;
+ }
case SILC_ID_SERVER:
SILC_LOG_DEBUG(("Old Server ID id(%s)",
SilcNotifyType type;
SilcArgumentPayload args;
SilcChannelID *channel_id;
- SilcClientID *client_id;
+ SilcClientID *client_id, *client_id2;
SilcChannelEntry channel;
SilcClientEntry client;
unsigned char *tmp;
if (!client) {
client = silc_idlist_find_client_by_id(server->local_list,
client_id, NULL);
- if (!client)
+ if (!client) {
+ silc_free(client_id);
goto out;
+ }
}
silc_free(client_id);
silc_idlist_del_client(server->global_list, client);
break;
- /* Ignore rest notify types for now */
- case SILC_NOTIFY_TYPE_NONE:
- case SILC_NOTIFY_TYPE_INVITE:
+ case SILC_NOTIFY_TYPE_NICK_CHANGE:
+ {
+ /*
+ * Distribute the notify to local clients on the channel
+ */
+ unsigned char *id, *id2;
+
+ SILC_LOG_DEBUG(("NICK CHANGE notify"));
+
+ /* Get old client ID */
+ id = silc_argument_get_arg_type(args, 1, &tmp_len);
+ if (!id)
+ goto out;
+ client_id = silc_id_payload_parse_id(id, tmp_len);
+
+ /* Get new client ID */
+ id2 = silc_argument_get_arg_type(args, 2, &tmp_len);
+ if (!id2)
+ goto out;
+ client_id2 = silc_id_payload_parse_id(id2, tmp_len);
+
+ SILC_LOG_DEBUG(("Old Client ID id(%s)",
+ silc_id_render(client_id, SILC_ID_CLIENT)));
+ SILC_LOG_DEBUG(("New Client ID id(%s)",
+ silc_id_render(client_id2, SILC_ID_CLIENT)));
+
+ /* Replace the Client ID */
+ client = silc_idlist_replace_client_id(server->global_list, client_id,
+ client_id2);
+ if (!client)
+ client = silc_idlist_replace_client_id(server->local_list, client_id,
+ client_id2);
+
+ if (client)
+ /* Send the NICK_CHANGE notify type to local clients on the channels
+ this client is joined to. */
+ silc_server_send_notify_on_channels(server, client,
+ SILC_NOTIFY_TYPE_NICK_CHANGE, 2,
+ id, tmp_len,
+ id2, tmp_len);
+
+ silc_free(client_id);
+ if (!client)
+ silc_free(client_id2);
+ break;
+ }
case SILC_NOTIFY_TYPE_TOPIC_SET:
+ /*
+ * Distribute the notify to local clients on the channel
+ */
+ SILC_LOG_DEBUG(("TOPIC SET notify (not-impl XXX)"));
+ break;
+
case SILC_NOTIFY_TYPE_CMODE_CHANGE:
+ /*
+ * Distribute the notify to local clients on the channel
+ */
+ SILC_LOG_DEBUG(("CMODE CHANGE notify (not-impl XXX)"));
+ break;
+
case SILC_NOTIFY_TYPE_CUMODE_CHANGE:
+ /*
+ * Distribute the notify to local clients on the channel
+ */
+ SILC_LOG_DEBUG(("CUMODE CHANGE notify (not-impl XXX)"));
+ break;
+
+ /* Ignore rest notify types for now */
+ case SILC_NOTIFY_TYPE_NONE:
+ case SILC_NOTIFY_TYPE_INVITE:
case SILC_NOTIFY_TYPE_MOTD:
default:
break;
[Cipher]
-rc6:/home/silc/silc/lib/silcsim/modules/rc6.sim.so:16:16
-twofish:/home/silc/silc/lib/silcsim/modules/twofish.sim.so:16:16
-mars:/home/silc/silc/lib/silcsim/modules/mars.sim.so:16:16
-none:/home/silc/silc/lib/silcsim/modules/none.sim.so:0:0
+rc6:../lib/silcsim/modules/rc6.sim.so:16:16
+twofish:../lib/silcsim/modules/twofish.sim.so:16:16
+mars:../lib/silcsim/modules/mars.sim.so:16:16
+none:../lib/silcsim/modules/none.sim.so:0:0
[HashFunction]
md5::64:16
Mun huone:Mun servo:Pekka Riikonen:priikone@poseidon.pspt.fi
[ServerInfo]
-lassi.kuo.fi.ssh.com:10.2.1.7:Kuopio, Finland:1335
+lassi.kuo.fi.ssh.com:212.146.8.246:Kuopio, Finland:1334
[ListenPort]
-10.2.1.7:10.2.1.7:1335
+212.146.8.246:212.146.8.246:1334
[Logging]
-infologfile:silcd3.log:10000
+infologfile:silcd2.log:10000
#warninglogfile:/var/log/silcd_warning.log:10000
-errorlogfile:silcd3.log:10000
+errorlogfile:silcd2.log:10000
#fatallogfile:/var/log/silcd_error.log:
[ConnectionClass]
2:200:300:400
[ClientConnection]
-10.2.1.199:passwd:priikone:333:1
:::1333:1
:::1334:1
:::1335:1
:::1336:1
[AdminConnection]
-10.2.1.199:passwd:priikone:priikone:1
[ServerConnection]
-10.2.1.7:passwd:priikone:1333:1:1
-10.2.1.7:passwd:priikone:1336:1:1
+212.146.8.246:passwd:priikone:1333:1:1
[RouterConnection]