X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/3cd48bb5e02b75bac960a51af6f589b0b09d95bc..adf799ddb18af44ae2c4f68d9252af8c1848d0c5:/ssh.c diff --git a/ssh.c b/ssh.c index 16e72043..e8d8230a 100644 --- a/ssh.c +++ b/ssh.c @@ -952,7 +952,11 @@ static int do_ssh_init(void) { vlog[strcspn(vlog, "\r\n")] = '\0'; logevent(vlog); - if (ssh_versioncmp(version, "2.0" /* FIXME: "1.99" */ ) >= 0) { + /* + * Server version "1.99" means we can choose whether we use v1 + * or v2 protocol. Choice is based on cfg.sshprot. + */ + if (ssh_versioncmp(version, cfg.sshprot == 1 ? "2.0" : "1.99") >= 0) { /* * This is a v2 server. Begin v2 protocol. */