diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2018-01-23 05:12:13 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2018-01-23 05:12:13 +0000 |
commit | d62456cd21e21bfc8b8fd939666eec2a952f9366 (patch) | |
tree | 2128a13122e6724833eff8208cc2f525347b7941 | |
parent | 574cb6ae0c662fd18bf4cfad58e4fa22c781152e (diff) |
unbreak support for clients that advertise a protocol version
of "1.99" (indicating both v2 and v1 support). Busted by me during
SSHv1 purge in r1.358; bz2810, ok dtucker
-rw-r--r-- | usr.bin/ssh/sshd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index c3282157068..c93e0887a67 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.500 2018/01/23 05:01:15 djm Exp $ */ +/* $OpenBSD: sshd.c,v 1.501 2018/01/23 05:12:12 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -431,7 +431,7 @@ sshd_exchange_identification(struct ssh *ssh, int sock_in, int sock_out) debug("Local version string %.200s", server_version_string); if (remote_major != 2 || - (remote_major == 1 && remote_minor != 99)) { + !(remote_major == 1 && remote_minor == 99)) { s = "Protocol major versions differ.\n"; (void) atomicio(vwrite, sock_out, s, strlen(s)); close(sock_in); |