From 487b9263317ab859b530cdda115984a970ca04eb Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Thu, 29 Nov 2001 20:16:46 +0000 Subject: [PATCH] updates. --- CHANGES | 3 +++ INSTALL | 10 ++++++-- TODO | 50 ++++++++++++++++++++------------------- doc/example_silcd.conf.in | 8 +++---- lib/silcclient/command.c | 3 +++ lib/silcutil/silcnet.c | 15 +++++++++--- 6 files changed, 56 insertions(+), 33 deletions(-) diff --git a/CHANGES b/CHANGES index 23deb391..388e17c7 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,9 @@ Thu Nov 29 22:12:50 EET 2001 Pekka Riikonen ' 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 ' * Added IPv6 support checking to the configure.in.pre, added diff --git a/INSTALL b/INSTALL index de90a118..675fbe2f 100644 --- 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 97f57b54..9c8eb3f7 100644 --- 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 diff --git a/doc/example_silcd.conf.in b/doc/example_silcd.conf.in index 71802131..7cce0213 100644 --- a/doc/example_silcd.conf.in +++ b/doc/example_silcd.conf.in @@ -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@ diff --git a/lib/silcclient/command.c b/lib/silcclient/command.c index 0ac7191b..5257bf45 100644 --- a/lib/silcclient/command.c +++ b/lib/silcclient/command.c @@ -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; diff --git a/lib/silcutil/silcnet.c b/lib/silcutil/silcnet.c index 272e7e30..60c5c77e 100644 --- a/lib/silcutil/silcnet.c +++ b/lib/silcutil/silcnet.c @@ -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 -- 2.24.0