updates.
authorPekka Riikonen <priikone@silcnet.org>
Thu, 29 Nov 2001 20:16:46 +0000 (20:16 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Thu, 29 Nov 2001 20:16:46 +0000 (20:16 +0000)
CHANGES
INSTALL
TODO
doc/example_silcd.conf.in
lib/silcclient/command.c
lib/silcutil/silcnet.c

diff --git a/CHANGES b/CHANGES
index 23deb39138fc09ad0ee10df7193dbd69af7bc791..388e17c7a79428c4600ccb7e86f4a72f621dcae2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,9 @@ Thu Nov 29 22:12:50 EET 2001  Pekka Riikonen <priikone@silcnet.org>'
          Fixes the CUMODE command when regaining founder privileges,
          and a little WHOIS problem.
 
+       * Fixed silc_net_gethostbyname to correctly call the
+         inet_ntop.  Affected file lib/silcutil/silcnet.c.
+
 Thu Nov 29 19:31:23 EET 2001  Pekka Riikonen <priikone@silcnet.org>'
 
        * Added IPv6 support checking to the configure.in.pre, added
diff --git a/INSTALL b/INSTALL
index de90a1180a72fe101a1df93bde40528430533d19..675fbe2f43dbc75ed39915216e6df7d7d02a11cd 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,13 +1,13 @@
 Quick Installation
 ==================
 
-To configure and compile SILC package give the comands:
+   To configure and compile SILC package give the comands:
 
        ./configure
        make (or gmake)
        make install
 
-This will install the SILC binaries and configuration files into the
+   This will install the SILC binaries and configuration files into the
 /usr/local/silc/ directory.  System wide configuration files are installed
 into the /etc/silc/ directory.
 
@@ -44,6 +44,12 @@ you can give this option to the `configure'.
 you can give --disable-threads option.  In this case all compiled programs
 will work in single thread only.
 
+--enable-ipv6
+
+   The `configure' will attempt to check for IPv6 support in your system.
+   However, if it fails, but you still want to compile in the IPv6 support
+   you can give --enable-ipv6 option to force the IPv6 support.
+
 Basic Installation
 ==================
 
diff --git a/TODO b/TODO
index 97f57b54dd05ffe901f0829ca790b480c9ab342a..9c8eb3f71ea1b808652bffd636028fe59a63da59 100644 (file)
--- a/TODO
+++ b/TODO
@@ -45,18 +45,38 @@ TODO/bugs In SILC Server
    the JOIN command.  This will bypass invite-only mode as well for
    the client who got the founder mode during JOIN.
 
- o After backup resume protocol the TOPIC_SET was not handled correctly
-   by all (unknown Channel ID).
+ o Optimize the WHOIS and IDENTIFY commands to check if the request
+   includes an ID or multiple IDs, then they are checked from local cache
+   first, and not sent directly to router.  This is because if they
+   are found in the local cache there's no need to send them to the
+   router.  Only if some ID is not found, or an found entry is 
+   incomplete it can be queried from the router.  This way these
+   commands become faster, and for example JOIN command becomes a lot
+   faster since the server ends up resolving the same information only
+   once, as opposed to resolve it everytime JOIN command is issued, like
+   it does now.
+
+   The same thing can be done with WHOWAS command as well.
+
+   It is important to send these requests to router only if they can be
+   expanded to many results (as when doing WHOIS for nickname).  If
+   they are explicit (like requesting by ID) the local cache MUST be
+   searched before sending it to router.
 
- o Channel user mode changes are notified unnecessarely when switching
-   to backup router on router crash.
+ o Announcements are incomplete: channel topics are not announced,
+   user modes (UMODE) are not announced.
 
  o Change the server to connect to another server from low ports (706)
    and not from high ports.  Currently we cannot do incoming connection
    checking by remote port because the port is not fixed.
 
- o Announcements are incomplete: channel topics are not announced,
-   user modes (UMODE) are not announced.
+ o Backup router related issues
+
+       o After backup resume protocol the TOPIC_SET was not handled
+         correctly by all (unknown Channel ID).
+
+       o Channel user mode changes are notified unnecessarely when
+         switching to backup router on router crash.
 
  o If client's public key is saved in the server (and doing public key
    authentication) then the hostname and the username information could
@@ -69,24 +89,6 @@ TODO/bugs In SILC Server
    each JOIN command will create and distribute the new channel key
    to everybody on the channel.
 
- o Optimize the WHOIS and IDENTIFY commands to somehow check whether the
-   requested clients are on some channel that the server knows about.  If
-   this is the case then the request is not needed to be forwarded to the
-   router.  One specific optimization could be done with JOIN command.
-   If the previous command to the WHOIS and IDENTIFY commands are JOIN
-   command (from the client) it can be expected (though it must be
-   verified) that the client is resolving the users on the channel it just
-   joined.  If server has done this once there is really no reason to
-   resolve it twice (from the router), it can reply directly back with
-   the information it knows.  This is because the server would (will) 
-   receive notifications from the router for users that are on a local
-   channel.
-
-   The same is with whowas command.  Actually with all these commands
-   it should be checked also whether the requested information is local.
-   If it is, there is no reason to send it to the router, since the server
-   knows it best.
-
  o New configuration file format must be added.  The new one will be
    done using the dotconf config library (lib/dotconf).  The following
    tasks relates closely to this as well and must be done at the same time
index 71802131214d1017967f731ab6e7d2f02198c9f2..7cce0213cad32d2318c78759628c8c4cdfafb708 100644 (file)
@@ -210,17 +210,17 @@ infologfile:@LOGSDIR@/silcd.log:10000
 #10.2.1.99:0:Your connection has been denied
 
 #
-#Message Of The Day
+# Message Of The Day
 #
-#specify the text file containing the motd:
+# specify the text file containing the motd:
 #
 #[motd]
 #@ETCDIR@/motd.txt
 
 #
-#pidfile
+# Pid File
 #
-#speficy the pidfile where it will be written:
+# specify the pidfile where it will be written:
 #
 [pid]
 @PIDFILE@
index 0ac7191bae7675f0258a320822cb6a69051d3e17..5257bf450ef6f306f11eec2a37932d7a4c117b89 100644 (file)
@@ -368,6 +368,9 @@ SILC_CLIENT_CMD_FUNC(nick_change)
       silc_free(conn->nickname);
     conn->nickname = strdup(cmd->argv[1]);
     conn->local_entry->nickname = conn->nickname;
+    silc_idcache_del_by_context(conn->client_cache, conn->local_entry);
+    silc_idcache_add(conn->client_cache, strdup(cmd->argv[1]), 
+                    conn->local_entry->id, conn->local_entry, FALSE);
     COMMAND;
   } else {
     COMMAND_ERROR;
index 272e7e300f306738495159bad4af86abf1f3a0e4..60c5c77e3ccaf0b2a3e230e8d680668a554136e6 100644 (file)
@@ -158,9 +158,18 @@ bool silc_net_gethostbyname(const char *name, char *address,
   if (getnameinfo(ai->ai_addr, ai->ai_addrlen, hbuf,
                  sizeof(hbuf), NULL, 0, NI_NUMERICHOST))
     return FALSE;
-  
-  if (!inet_ntop(ai->ai_family, ai->ai_addr, address, address_len))
-    return FALSE;
+
+  if (ai->ai_family == AF_INET) {
+    if (!inet_ntop(ai->ai_family, 
+                  &((struct sockaddr_in *)ai->ai_addr)->sin_addr,
+                  address, address_len))
+      return FALSE;
+  } else {
+    if (!inet_ntop(ai->ai_family, 
+                  &((struct sockaddr_in6 *)ai->ai_addr)->sin6_addr,
+                  address, address_len))
+      return FALSE;
+  }
 
   freeaddrinfo(ai);
 #else