diff options
author | djm@openbsd.org <djm@openbsd.org> | 2015-01-28 22:15:47 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-01-28 23:08:07 +0100 |
commit | fae7bbe544cba7a9e5e4ab47ff6faa3d978646eb (patch) | |
tree | a27a07031b600a1925a128bc0f5258a4b3ab2e8c /ssh-keyscan.c | |
parent | upstream commit (diff) | |
download | openssh-fae7bbe544cba7a9e5e4ab47ff6faa3d978646eb.tar.xz openssh-fae7bbe544cba7a9e5e4ab47ff6faa3d978646eb.zip |
upstream commit
avoid fatal() calls in packet code makes ssh-keyscan more
reliable against server failures ok dtucker@ markus@
Diffstat (limited to 'ssh-keyscan.c')
-rw-r--r-- | ssh-keyscan.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 25a257cc2..e59eacace 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keyscan.c,v 1.96 2015/01/20 23:14:00 deraadt Exp $ */ +/* $OpenBSD: ssh-keyscan.c,v 1.97 2015/01/28 21:15:47 djm Exp $ */ /* * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>. * @@ -319,8 +319,10 @@ tcpconnect(char *host) memset(&hints, 0, sizeof(hints)); hints.ai_family = IPv4or6; hints.ai_socktype = SOCK_STREAM; - if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) - fatal("getaddrinfo %s: %s", host, ssh_gai_strerror(gaierr)); + if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) { + error("getaddrinfo %s: %s", host, ssh_gai_strerror(gaierr)); + return -1; + } for (ai = aitop; ai; ai = ai->ai_next) { s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); if (s < 0) { |