+Thu Oct 11 12:14:19 EDT 2001 Pekka Riikonen <priikone@silcnet.org>
+
+ * Check for existing server ID in silc_server_new_server
+ and in silc_server_connect_to_router_final and remove the
+ old entry if it exists. Affected file silcd/packet_receive.c,
+ silcd/server.c.
+
+ * Send the channel message always to only one router, either
+ in upstream or downstream. Affected file is
+ silcd/packet_send.c.
+
Tue Oct 9 17:45:43 EDT 2001 Pekka Riikonen <priikone@silcnet.org>
* Wrote the definition of the backup resuming protocol to the
SilcPacketContext *packet)
{
SilcBuffer buffer = packet->buffer;
- SilcServerEntry new_server;
+ SilcServerEntry new_server, server_entry;
SilcServerID *server_id;
SilcIDListData idata;
unsigned char *server_name, *id_string;
}
silc_free(id_string);
+ /* Check that we do not have this ID already */
+ server_entry = silc_idlist_find_server_by_id(server->local_list,
+ server_id, TRUE, NULL);
+ if (server_entry) {
+ silc_idcache_del_by_context(server->local_list->servers, server_entry);
+ } else {
+ server_entry = silc_idlist_find_server_by_id(server->global_list,
+ server_id, TRUE, NULL);
+ if (server_entry)
+ silc_idcache_del_by_context(server->global_list->servers, server_entry);
+ }
+
/* Update server entry */
idata->status |= SILC_IDLIST_STATUS_REGISTERED;
new_server->server_name = server_name;
new_server->id = server_id;
+
+ SILC_LOG_DEBUG(("New server id(%s)",
+ silc_id_render(server_id, SILC_ID_SERVER)));
/* Add again the entry to the ID cache. */
silc_idcache_add(server->local_list->servers, server_name, server_id,
uint32 routed_count = 0;
SilcIDListData idata;
SilcHashTableList htl;
+ bool gone = FALSE;
SILC_LOG_DEBUG(("Relaying packet to channel"));
channel keys are cell specific and we have different channel
key than the remote router has. */
if (sock->type == SILC_SOCKET_TYPE_ROUTER) {
+
+ if (gone)
+ continue;
+
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 */
SILC_LOG_INFO(("Connected to router %s", sock->hostname));
+ /* Check that we do not have this ID already */
+ id_entry = silc_idlist_find_server_by_id(server->local_list,
+ ctx->dest_id, TRUE, NULL);
+ if (id_entry) {
+ silc_idcache_del_by_context(server->local_list->servers, id_entry);
+ } else {
+ id_entry = silc_idlist_find_server_by_id(server->global_list,
+ ctx->dest_id, TRUE, NULL);
+ if (id_entry)
+ silc_idcache_del_by_context(server->global_list->servers, id_entry);
+ }
+
+ SILC_LOG_DEBUG(("New server id(%s)",
+ silc_id_render(ctx->dest_id, SILC_ID_SERVER)));
+
/* Add the connected router to local server list */
id_entry = silc_idlist_add_server(server->local_list, strdup(sock->hostname),
SILC_ROUTER, ctx->dest_id, NULL, sock);
destination does not exist in router's route cache the packet MUST be
routed to the primary route (default route).
+However, there are some issues when routing channel messages to group
+of users. Routers are responsible of routing the channel message to
+other routers, local servers and local clients as well. Routers MUST
+send the channel message to only one router in the network, preferrably
+to the shortest route to reach the channel users. The message can be
+routed into either upstream or downstream. After the message is sent
+to a router in the network it MUST NOT be sent to any other router in
+either same route or other route. The message MUST NOT be routed to
+the router it came from.
+
+When routing for example private messages they should be routed to the
+shortest route always to reach the destination client as fast as possible.
+
For server which receives a packet to be routed to its locally connected
client the server MUST check whether the particular packet type is
allowed to be routed to the client. Not all packets may be sent by
server cannot send, for example, disconnect packet to client that is not
directly connected to the server.
+Routers form a ring in the SILC network. However, routers may have other
+direct connections to other routers in the network too. This can cause
+interesting routing problems in the network. Since the network is ring,
+the packets usually should be routed into counter clock-wise direction,
+or if it cannot be used then always clock-wise (primary route) direction.
+Problems may arise when a faster direct route exists and router is routing
+a channel messages. Currently channel messages must be routed either
+in upstream or downstream, they cannot be routed to other direct routes.
+The SILC protocol should have a shortest path discovery protocol, and some
+existing routing protocol, that can handle a ring network with other direct
+routes inside the ring (hybrid ring-mesh network), MAY be defined to be
+used with the SILC protocol. Additional specifications MAY be written
+on the subject.
+
.ti 0
2.12 Packet Broadcasting
Every router has their primary route which is a connection to another
router in the network. Unless there is only two routers in the network
must not routers use each other as their primary routes. The router
-connections in the network must form a circular.
+connections in the network must form a ring.
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.
+
See [SILC2] for description of channel message encryption and decryption
process.