if (!channel) {
channel = silc_idlist_find_channel_by_id(server->global_list, id, NULL);
if (!channel) {
- SILC_LOG_DEBUG(("Could not find channel"));
+ SilcBuffer idp;
+ unsigned char error;
+
+ /* Send SILC_NOTIFY_TYPE_ERROR to indicate that such destination ID
+ does not exist or is invalid. */
+ idp = silc_id_payload_encode_data(packet->dst_id,
+ packet->dst_id_len,
+ packet->dst_id_type);
+ if (!idp)
+ goto out;
+
+ error = SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID;
+ if (packet->src_id_type == SILC_ID_CLIENT) {
+ SilcClientID *client_id = silc_id_str2id(packet->src_id,
+ packet->src_id_len,
+ packet->src_id_type);
+ silc_server_send_notify_dest(server, sock, FALSE,
+ client_id, SILC_ID_CLIENT,
+ SILC_NOTIFY_TYPE_ERROR, 2,
+ &error, 1, idp->data, idp->len);
+ silc_free(client_id);
+ } else {
+ silc_server_send_notify(server, sock, FALSE,
+ SILC_NOTIFY_TYPE_ERROR, 2,
+ &error, 1, idp->data, idp->len);
+ }
+
+ silc_buffer_free(idp);
goto out;
}
}
The header in the packet MUST NOT change during the routing of the
packet. The original sender, for example client, assembles the packet
and the packet header and server or router between the sender and the
-receiver MUST NOT change the packet header.
+receiver MUST NOT change the packet header. Note however, that some
+packets such as commands may resent by a server to serve the client's
+original command. In this case the command packet send by the server
+includes the server's IDs.
Note that the packet and the packet header may be encrypted with
different keys. For example, packets to channels are encrypted with
If server receives a private message packet which includes invalid
destionation Client ID the server MUST send SILC_NOTIFY_TYPE_ERROR
-notify to the client with error status indicating that such ID does
-not exist to the client.
+notify to the client with error status indicating that such Client ID
+does not exist.
See [SILC2] for description of private message encryption and decryption
process.
in [SILC3], however, the HMAC key material MUST be discarded.
If the key is pre-shared-key or randomly generated the implementations
-should use the SILC protocol's mandatory cipher as the cipher. If the
-SKE was used to negotiate key material the cipher was negotiated as well.
+SHOULD use the SILC protocol's mandatory cipher as the cipher. If the
+SKE was used to negotiate key material the cipher was negotiated as well,
+and may be different from default cipher.
+
.ti 0
4.7 Channel Message Sending and Reception
distribute the message to all clients on the channel by sending the
channel message destined explicitly to a client on the channel.
-See the [SILC2] for description of channel messege routing for router
-servers.
+If server receives a channel message packet which includes invalid
+destionation Channel ID the server MUST send SILC_NOTIFY_TYPE_ERROR
+notify to the sender with error status indicating that such Channel ID
+does not exist.
-See [SILC2] for description of channel message encryption and decryption
-process.
+See the [SILC2] for description of channel messege routing for router
+servers, and channel message encryption and decryption process.
.ti 0
Client usually sends the commands in the SILC network. In this case
the client simply sends the command packet to server and the server
-processes it and replies with command reply packet.
+processes it and replies with command reply packet. See the [SILC3]
+for detailed description of all commands.
However, if the server is not able to process the command, it is sent
to the server's router. This is case for example with commands such