]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authordtucker@openbsd.org <dtucker@openbsd.org>
Fri, 10 Apr 2015 05:16:50 +0000 (05:16 +0000)
committerDamien Miller <djm@mindrot.org>
Mon, 13 Apr 2015 04:37:19 +0000 (14:37 +1000)
Don't send hostkey advertisments
 (hostkeys-00@openssh.com) to current versions of Tera Term as they can't
 handle them.  Newer versions should be OK.  Patch from Bryan Drewery and
 IWAMOTO Kouichi, ok djm@

compat.c
compat.h
sshd.c

index 2498168d721c21b06ba85028d61035b2bfd99654..0934de90f61e73bb473194ba794f7db089d51b55 100644 (file)
--- a/compat.c
+++ b/compat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: compat.c,v 1.88 2015/04/07 23:00:42 djm Exp $ */
+/* $OpenBSD: compat.c,v 1.89 2015/04/10 05:16:50 dtucker Exp $ */
 /*
  * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl.  All rights reserved.
  *
@@ -167,6 +167,17 @@ compat_datafellows(const char *version)
                                        SSH_BUG_SCANNER },
                { "Probe-*",
                                        SSH_BUG_PROBE },
+               { "TeraTerm SSH*,"
+                 "TTSSH/1.5.*,"
+                 "TTSSH/2.1*,"
+                 "TTSSH/2.2*,"
+                 "TTSSH/2.3*,"
+                 "TTSSH/2.4*,"
+                 "TTSSH/2.5*,"
+                 "TTSSH/2.6*,"
+                 "TTSSH/2.70*,"
+                 "TTSSH/2.71*,"
+                 "TTSSH/2.72*",        SSH_BUG_HOSTKEYS },
                { NULL,                 0 }
        };
 
index af2f0073fb0a9658ec5599f7b54e533ba278c826..83507f070356f8c5a53f0c8cda7d45bbc706cf44 100644 (file)
--- a/compat.h
+++ b/compat.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: compat.h,v 1.46 2015/01/19 20:20:20 markus Exp $ */
+/* $OpenBSD: compat.h,v 1.47 2015/04/10 05:16:50 dtucker Exp $ */
 
 /*
  * Copyright (c) 1999, 2000, 2001 Markus Friedl.  All rights reserved.
@@ -60,6 +60,7 @@
 #define SSH_NEW_OPENSSH                0x04000000
 #define SSH_BUG_DYNAMIC_RPORT  0x08000000
 #define SSH_BUG_CURVE25519PAD  0x10000000
+#define SSH_BUG_HOSTKEYS       0x20000000
 
 void     enable_compat13(void);
 void     enable_compat20(void);
diff --git a/sshd.c b/sshd.c
index 6aa17fa654bac2f8f05e925b08d309d92efbed4d..60b0cd4bb15e642a51f6428f6f3875095726148c 100644 (file)
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.445 2015/03/31 22:55:24 djm Exp $ */
+/* $OpenBSD: sshd.c,v 1.446 2015/04/10 05:16:50 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -928,6 +928,10 @@ notify_hostkeys(struct ssh *ssh)
        int i, nkeys, r;
        char *fp;
 
+       /* Some clients cannot cope with the hostkeys message, skip those. */
+       if (datafellows & SSH_BUG_HOSTKEYS)
+               return;
+
        if ((buf = sshbuf_new()) == NULL)
                fatal("%s: sshbuf_new", __func__);
        for (i = nkeys = 0; i < options.num_host_key_files; i++) {