From 5fc0787329f9ec1a42ebc1c183fcfa57f7177040 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Thu, 19 Apr 2001 09:48:04 +0000 Subject: [PATCH] updates. --- apps/silcd/packet_send.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/silcd/packet_send.c b/apps/silcd/packet_send.c index 9e1582b9..6764fb8c 100644 --- a/apps/silcd/packet_send.c +++ b/apps/silcd/packet_send.c @@ -591,6 +591,7 @@ void silc_server_packet_relay_to_channel(SilcServer server, SilcChannelEntry channel, void *sender, SilcIdType sender_type, + void *sender_entry, unsigned char *data, uint32 data_len, int force_send) @@ -660,7 +661,8 @@ void silc_server_packet_relay_to_channel(SilcServer server, if (client) { /* If sender is one on the channel do not send it the packet. */ - if (!found && !SILC_ID_CLIENT_COMPARE(client->id, sender)) { + if (!found && sender_type == SILC_ID_CLIENT && + !SILC_ID_CLIENT_COMPARE(client->id, sender)) { found = TRUE; continue; } @@ -688,6 +690,13 @@ void silc_server_packet_relay_to_channel(SilcServer server, sock = (SilcSocketConnection)client->router->connection; idata = (SilcIDListData)client->router; + /* Do not send to the sender. Check first whether the true + sender's router is same as this client's router. Also check + if the sender socket is the same as this client's router + socket. */ + if (sender_entry && + ((SilcClientEntry)sender_entry)->router == client->router) + continue; if (sender_sock && sock == sender_sock) continue; -- 2.24.0