From 6db8ad3f940c0be75d416fb3ba4330700ef9bad4 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sun, 24 Mar 2002 17:22:55 +0000 Subject: [PATCH] Protocol check changes. --- apps/silcd/protocol.c | 5 +++-- lib/silcclient/protocol.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/silcd/protocol.c b/apps/silcd/protocol.c index 7cb72ada..4f9678d1 100644 --- a/apps/silcd/protocol.c +++ b/apps/silcd/protocol.c @@ -331,8 +331,9 @@ SilcSKEStatus silc_ske_check_version(SilcSKE ske, unsigned char *version, SILC_LOG_INFO(("%s (%s) is version %s", ske->sock->hostname, ske->sock->ip, version)); - /* Check for initial version string */ - if (!strstr(version, "SILC-1.0-")) + /* Check for initial version string. Allowed "SILC-x.x-". More + specific protocol version is checked later in session. */ + if (!strstr(version, "SILC-")) status = SILC_SKE_STATUS_BAD_VERSION; /* Check software version */ diff --git a/lib/silcclient/protocol.c b/lib/silcclient/protocol.c index 4044fbbd..932bd3ab 100644 --- a/lib/silcclient/protocol.c +++ b/lib/silcclient/protocol.c @@ -175,8 +175,8 @@ SilcSKEStatus silc_ske_check_version(SilcSKE ske, unsigned char *version, char *cp; int maj = 0, min = 0, build = 0, maj2 = 0, min2 = 0, build2 = 0; - /* Check for initial version string */ - if (!strstr(version, "SILC-1.0-")) + /* Check for initial version string. Allowed "SILC-1.x-". */ + if (!strstr(version, "SILC-1.")) status = SILC_SKE_STATUS_BAD_VERSION; /* Check software version */ -- 2.43.0