From: stsp Date: Tue, 23 Jan 2018 20:00:58 +0000 (+0000) Subject: Fix a logic bug in sshd_exchange_identification which prevented clients X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6a0be14257616885780d125e01f9558622e427f3;p=openbsd Fix a logic bug in sshd_exchange_identification which prevented clients using major protocol version 2 from connecting to the server. ok millert@ --- diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index 3af4108eaff..1fe65ec9be9 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.502 2018/01/23 05:27:21 djm Exp $ */ +/* $OpenBSD: sshd.c,v 1.503 2018/01/23 20:00:58 stsp Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -426,7 +426,7 @@ sshd_exchange_identification(struct ssh *ssh, int sock_in, int sock_out) chop(server_version_string); debug("Local version string %.200s", server_version_string); - if (remote_major != 2 || + if (remote_major != 2 && !(remote_major == 1 && remote_minor == 99)) { s = "Protocol major versions differ.\n"; (void) atomicio(vwrite, sock_out, s, strlen(s));