updates.
authorPekka Riikonen <priikone@silcnet.org>
Tue, 16 Apr 2002 10:38:16 +0000 (10:38 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Tue, 16 Apr 2002 10:38:16 +0000 (10:38 +0000)
CHANGES
TODO
apps/silcd/packet_receive.c
doc/draft-riikonen-silc-pp-05.nroff
doc/draft-riikonen-silc-spec-05.nroff
prepare

diff --git a/CHANGES b/CHANGES
index 8464a923af93ce392e8707bc18f120eafdc174a3..d7d67dc11e8bc85218cf6e053eebaf9ae7cab0b5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,10 @@
+Tue Apr 16 09:34:40 EEST 2002  Pekka Riikonen <priikone@silcnet.org>
+
+       * Defined that channel message to unknown Channel ID must
+         cause SILC_NOTIFY_TYPE_ERROR notify message to the sender.
+         Updated the protocol specs and the code in server.  The
+         affected file is silcd/packet_receive.c.
+
 Mon Apr 15 19:57:57 EEST 2002  Pekka Riikonen <priikone@silcnet.org>
 
        * Added new notify type SILC_NOTIFY_TYPE_ERROR and specified
diff --git a/TODO b/TODO
index e0a20a8f40aab7a71851a9c9d7da09a607d9a43e..6bcc7fa58c7f07f91d750504e47db65dd0272c20 100644 (file)
--- a/TODO
+++ b/TODO
@@ -118,3 +118,6 @@ TODO in SILC Protocol
 
  24. Implement the <Requested Attributes> and the Attribute Payload to
      the core library, client and server.
+
+ 25. Disconnect Payload change to include Status Type instead of
+     human readable error message?
index d124a91c68012b12a34fecf04572fcba09dbb97d..428c1f7f9f47d94744424e609a116e0537e6e5ff 100644 (file)
@@ -1682,7 +1682,34 @@ void silc_server_channel_message(SilcServer server,
   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;
     }
   }
index 21ec404820476e715d2434d1f385ba0ff8d9d886..818597f5762e630aabd52d2048c2c7aea09ac4ee 100644 (file)
@@ -1706,7 +1706,7 @@ o Initial Vector (variable length) - The initial vector
   initial vector.  This field is not encrypted.  This field
   is not included into the padding calculation.  Length
   of this field equals the cipher's block size.  This field
-  is, however, authenticated.
+  is, however authenticated.
 .in 3
 
 
index 4611512d80ea0232216896cadf4a2d8e2c92f613..9c62e5839f51f726634babafac1794d167a3a8a3 100644 (file)
@@ -922,7 +922,10 @@ tell to where the packet needs to be sent and where it is coming from.
 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
@@ -1975,8 +1978,8 @@ it should have cached the Client ID from the SILC Packet Header.
 
 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.
@@ -2007,8 +2010,10 @@ ignored.  After processing the key material it is employed as defined
 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
@@ -2022,11 +2027,13 @@ as Destination ID in the SILC Packet Header.  The server MUST then
 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
@@ -2071,7 +2078,8 @@ MUST be protected with the new key.
 
 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
diff --git a/prepare b/prepare
index f5cfff57183be5e2f33aa19250a525bfc3f2940a..87f53dd2b2ea8685504e1f205780e8b0e0908d3a 100755 (executable)
--- a/prepare
+++ b/prepare
@@ -126,14 +126,14 @@ cp Makefile.defines.in lib/silcmath/mpi
 cp Makefile.defines_int.in lib/silcmath/mpi
 
 aclocal
-autoconf
+/home/silc/share/bin/autoconf
 autoheader >/dev/null 2>/dev/null
 automake
 
 echo "Preparing mpi"
 cd lib/silcmath/mpi
 aclocal
-autoconf
+/home/silc/share/bin/autoconf
 autoheader </dev/null 2>/dev/null
 automake >/dev/null 2>/dev/null
 cd ../../..