upstream commit

Add missing braces; fixes 'write: Socket is not
connected' error in ssh. ok deraadt@

OpenBSD-Commit-ID: db73a3a9e147722d410866cac34d43ed52e1ad24
This commit is contained in:
stsp@openbsd.org 2018-01-23 18:33:49 +00:00 committed by Damien Miller
parent 20d53ac283
commit a60c5dcfa2
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: sshconnect.c,v 1.291 2018/01/23 05:27:21 djm Exp $ */ /* $OpenBSD: sshconnect.c,v 1.292 2018/01/23 18:33:49 stsp Exp $ */
/* /*
* Author: Tatu Ylonen <ylo@cs.hut.fi> * Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@ -453,10 +453,11 @@ ssh_connect_direct(struct ssh *ssh, const char *host, struct addrinfo *aitop,
/* Create a socket for connecting. */ /* Create a socket for connecting. */
sock = ssh_create_socket(needpriv, ai); sock = ssh_create_socket(needpriv, ai);
if (sock < 0) if (sock < 0) {
/* Any error is already output */ /* Any error is already output */
errno = 0; errno = 0;
continue; continue;
}
if (timeout_connect(sock, ai->ai_addr, ai->ai_addrlen, if (timeout_connect(sock, ai->ai_addr, ai->ai_addrlen,
timeout_ms) >= 0) { timeout_ms) >= 0) {