- if (idata->conn_type == SILC_CONN_CLIENT ||
- packet->src_id_type != SILC_ID_SERVER || !packet->dst_id) {
+ if (idata->conn_type == SILC_CONN_CLIENT) {
+ SILC_LOG_DEBUG(("Notify received from client, drop it"));
+ return;
+ }
+
+ if (packet->src_id_type != SILC_ID_SERVER){
+ SILC_LOG_DEBUG(("Bad notify packet received"));
+ return;
+ }
+
+ if (!packet->dst_id) {
/* Parse the Notify Payload */
payload = silc_notify_payload_parse(buffer->data, silc_buffer_len(buffer));
/* Parse the Notify Payload */
payload = silc_notify_payload_parse(buffer->data, silc_buffer_len(buffer));
/* If we are router and this packet is not already broadcast packet
we will broadcast it. The sending socket really cannot be router or
/* If we are router and this packet is not already broadcast packet
we will broadcast it. The sending socket really cannot be router or
/* Packet is destined to channel */
if (!silc_id_str2id(packet->dst_id, packet->dst_id_len,
packet->dst_id_type, &channel_id,
/* Packet is destined to channel */
if (!silc_id_str2id(packet->dst_id, packet->dst_id_len,
packet->dst_id_type, &channel_id,
silc_server_packet_send_dest(server, SILC_PRIMARY_ROUTE(server),
packet->type, packet->flags |
silc_server_packet_send_dest(server, SILC_PRIMARY_ROUTE(server),
packet->type, packet->flags |
channel = silc_idlist_find_channel_by_id(server->local_list,
SILC_ID_GET_ID(id), NULL);
if (!channel) {
channel = silc_idlist_find_channel_by_id(server->local_list,
SILC_ID_GET_ID(id), NULL);
if (!channel) {
channel = silc_idlist_find_channel_by_id(server->local_list,
SILC_ID_GET_ID(id), NULL);
if (!channel) {
channel = silc_idlist_find_channel_by_id(server->local_list,
SILC_ID_GET_ID(id), NULL);
if (!channel) {
channel = silc_idlist_find_channel_by_id(server->global_list,
SILC_ID_GET_ID(id), NULL);
if (!channel) {
channel = silc_idlist_find_channel_by_id(server->global_list,
SILC_ID_GET_ID(id), NULL);
if (!channel) {
channel = silc_idlist_find_channel_by_id(server->local_list,
SILC_ID_GET_ID(id), NULL);
if (!channel) {
channel = silc_idlist_find_channel_by_id(server->local_list,
SILC_ID_GET_ID(id), NULL);
if (!channel) {
global list. Cell wide information however is kept in the local
list. */
entry = silc_idlist_add_client(id_list, NULL, NULL, NULL,
global list. Cell wide information however is kept in the local
list. */
entry = silc_idlist_add_client(id_list, NULL, NULL, NULL,
/* As a router we keep information of all global information in our
global list. Cell wide information however is kept in the local
list. */
/* As a router we keep information of all global information in our
global list. Cell wide information however is kept in the local
list. */
- entry = silc_idlist_add_server(id_list, NULL, 0, &id, router,
+ entry = silc_idlist_add_server(id_list, NULL, 0,
+ silc_id_dup(&id, SILC_ID_SERVER), router,
- channel = silc_server_create_new_channel_with_id(server, NULL, NULL,
- channel_name,
- &channel_id, FALSE);
+ channel =
+ silc_server_create_new_channel_with_id(
+ server, NULL, NULL,
+ channel_name,
+ silc_id_dup(&channel_id, SILC_ID_CHANNEL),
+ FALSE);