Return correct command type in SILCOPER in case of error.
authorPekka Riikonen <priikone@silcnet.org>
Sat, 28 Apr 2007 18:23:55 +0000 (18:23 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 28 Apr 2007 18:23:55 +0000 (18:23 +0000)
Do not check for too new protocol version during SKE as per
silcd.conf(5).

CHANGES
apps/silcd/command.c
apps/silcd/protocol.c

diff --git a/CHANGES b/CHANGES
index 745717d0f7c284d232ae44cae8c4b9055d4c7747..43cdbb60bd8e43161d1368a351f25eba89915802 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+Sat Apr 28 21:19:45 EEST 2007  Pekka Riikonen <priikone@silcnet.org>
+
+       * Do not check for too new protocol version in during SKE,
+         per the documented feature in silcd.conf(5).
+
 Wed Mar  7 18:38:18 CET 2007  Jochen Eisinger <coffee@silcnet.org>
 
        * Fixed a core-dump when joining unknown channels.  Affected
@@ -20,6 +25,14 @@ Mon Mar  5 23:27:32 CET 2007  Jochen Eisinger <coffee@silcnet.org>
        * Update patch to makefile from trunk so parallel make will link
          the silc-client correctly.  Affected file lib/Makefile.ad
 
+Mon Dec 11 19:43:37 CET 2006  Pekka Riikonen <priikone@silcnet.org>
+
+        * Check for NULL SKE in rekey error handling.  Affected file
+          apps/silcd/protocol.c.
+
+        * Return correct command in SILCOPER command in case of error.
+          Affected file apps/silcd/command.c.
+
 Sun Nov 19 18:58:26 CET 2006  Jochen Eisinger <coffee@silcnet.org>
 
        * Import perl script for sign_messages from silc-plugin.  Affected
index ed0964fcf7b1bba5cf9f1795492a50e322fbdc4e..a42d254c8e195314d730a87cbf7a40a1572a973d 100644 (file)
@@ -4486,7 +4486,7 @@ SILC_SERVER_CMD_FUNC(silcoper)
   username = silc_identifier_check(username, tmp_len, SILC_STRING_UTF8, 128,
                                   &tmp_len);
   if (!username) {
-    silc_server_command_send_status_reply(cmd, SILC_COMMAND_OPER,
+    silc_server_command_send_status_reply(cmd, SILC_COMMAND_SILCOPER,
                                          SILC_STATUS_ERR_BAD_USERNAME,
                                          0);
     goto out;
@@ -4533,7 +4533,7 @@ SILC_SERVER_CMD_FUNC(silcoper)
   }
   if (!result) {
     /* Authentication failed */
-    silc_server_command_send_status_reply(cmd, SILC_COMMAND_OPER,
+    silc_server_command_send_status_reply(cmd, SILC_COMMAND_SILCOPER,
                                          SILC_STATUS_ERR_AUTH_FAILED, 0);
     goto out;
   }
index dd80fd0dad55ceb4e7e07da4d81b12201963be7b..f20f13360303053feb36925a86ee6a4a1927c884 100644 (file)
@@ -326,7 +326,7 @@ int silc_server_protocol_ke_set_keys(SilcServer server,
 SilcSKEStatus silc_ske_check_version(SilcSKE ske, unsigned char *version,
                                     SilcUInt32 len, void *context)
 {
-  SilcUInt32 l_protocol_version = 0, r_protocol_version = 0;
+  SilcUInt32 r_protocol_version = 0;
 
   SILC_LOG_INFO(("%s (%s) is version %s", ske->sock->hostname,
                 ske->sock->ip, version));
@@ -338,21 +338,6 @@ SilcSKEStatus silc_ske_check_version(SilcSKE ske, unsigned char *version,
     return SILC_SKE_STATUS_BAD_VERSION;
   }
 
-  if (!silc_parse_version_string(silc_version_string,
-                                &l_protocol_version, NULL, NULL,
-                                NULL, NULL)) {
-    SILC_LOG_ERROR(("%s (%s) %s is not allowed/supported version",
-                   ske->sock->hostname, ske->sock->ip, version));
-    return SILC_SKE_STATUS_BAD_VERSION;
-  }
-
-  /* If remote is too new, don't connect */
-  if (l_protocol_version < r_protocol_version) {
-    SILC_LOG_ERROR(("%s (%s) %s is not allowed/supported version",
-                   ske->sock->hostname, ske->sock->ip, version));
-    return SILC_SKE_STATUS_BAD_VERSION;
-  }
-
   ske->sock->version = r_protocol_version;
 
   return SILC_SKE_STATUS_OK;