- SILC_LOG_DEBUG(("Remote is router, encrypt with session key"));
- gone = TRUE;
-
- /* If private key mode is not set then decrypt the packet
- and re-encrypt it */
- if (!(channel->mode & SILC_CHANNEL_MODE_PRIVKEY)) {
- unsigned char *tmp = silc_calloc(data_len, sizeof(*data));
- memcpy(tmp, data, data_len);
-
- /* Decrypt the channel message (we don't check the MAC) */
- if (channel->channel_key &&
- !silc_channel_message_payload_decrypt(tmp, data_len,
- channel->channel_key,
- NULL)) {
- memset(tmp, 0, data_len);
- silc_free(tmp);
- continue;
- }
-
- /* Now re-encrypt and send it to the router */
- silc_server_packet_send_srcdest(server, sock,
- SILC_PACKET_CHANNEL_MESSAGE, 0,
- sender, sender_type,
- channel->id, SILC_ID_CHANNEL,
- tmp, data_len, force_send);
-
- /* Free the copy of the channel message */
+ /* If private key mode is not set then decrypt the packet
+ and re-encrypt it */
+ if (!(channel->mode & SILC_CHANNEL_MODE_PRIVKEY)) {
+ unsigned char *tmp = silc_calloc(data_len, sizeof(*data));
+ memcpy(tmp, data, data_len);
+
+ /* Decrypt the channel message (we don't check the MAC) */
+ if (channel->channel_key &&
+ !silc_channel_message_payload_decrypt(tmp, data_len,
+ channel->channel_key,
+ NULL)) {