summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorstsp@openbsd.org <stsp@openbsd.org>2018-01-23 20:00:58 +0000
committerDamien Miller <djm@mindrot.org>2018-01-24 11:59:01 +1100
commitc9c1bba06ad1c7cad8548549a68c071bd807af60 (patch)
tree9b526823b530aea13de0ee815cb1cd8dea1e0c12 /sshd.c
parenta60c5dcfa2538ffc94dc5b5adb3db5b6ed905bdb (diff)
upstream commit
Fix a logic bug in sshd_exchange_identification which prevented clients using major protocol version 2 from connecting to the server. ok millert@ OpenBSD-Commit-ID: 8668dec04586e27f1c0eb039ef1feb93d80a5ee9
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sshd.c b/sshd.c
index e7e3c99b4..77231c33b 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.502 2018/01/23 05:27:21 djm Exp $ */ 1/* $OpenBSD: sshd.c,v 1.503 2018/01/23 20:00:58 stsp Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -450,7 +450,7 @@ sshd_exchange_identification(struct ssh *ssh, int sock_in, int sock_out)
450 chop(server_version_string); 450 chop(server_version_string);
451 debug("Local version string %.200s", server_version_string); 451 debug("Local version string %.200s", server_version_string);
452 452
453 if (remote_major != 2 || 453 if (remote_major != 2 &&
454 !(remote_major == 1 && remote_minor == 99)) { 454 !(remote_major == 1 && remote_minor == 99)) {
455 s = "Protocol major versions differ.\n"; 455 s = "Protocol major versions differ.\n";
456 (void) atomicio(vwrite, sock_out, s, strlen(s)); 456 (void) atomicio(vwrite, sock_out, s, strlen(s));