- djm@cvs.openbsd.org 2004/01/25 03:49:09

[sshconnect.c]
     reset nonblocking flag after ConnectTimeout > 0 connect; (bugzilla #785)
     from jclonguet AT free.fr; ok millert@
This commit is contained in:
Damien Miller 2004-01-27 21:21:27 +11:00
parent b2d1c2b3b8
commit f6723f08e0
2 changed files with 11 additions and 6 deletions

View File

@ -12,6 +12,10 @@
[cipher.c]
rename acss@opebsd.org to acss@openssh.org
ok deraadt@
- djm@cvs.openbsd.org 2004/01/25 03:49:09
[sshconnect.c]
reset nonblocking flag after ConnectTimeout > 0 connect; (bugzilla #785)
from jclonguet AT free.fr; ok millert@
- (djm) [acss.c acss.h cipher-acss.c] Portable support for ACSS
if libcrypto lacks it
@ -1754,4 +1758,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
$Id: ChangeLog,v 1.3195 2004/01/27 10:20:59 djm Exp $
$Id: ChangeLog,v 1.3196 2004/01/27 10:21:27 djm Exp $

View File

@ -13,7 +13,7 @@
*/
#include "includes.h"
RCSID("$OpenBSD: sshconnect.c,v 1.155 2003/12/09 21:53:37 markus Exp $");
RCSID("$OpenBSD: sshconnect.c,v 1.156 2004/01/25 03:49:09 djm Exp $");
#include <openssl/bn.h>
@ -231,12 +231,12 @@ timeout_connect(int sockfd, const struct sockaddr *serv_addr,
if (timeout <= 0)
return (connect(sockfd, serv_addr, addrlen));
if (fcntl(sockfd, F_SETFL, O_NONBLOCK) < 0)
return (-1);
set_nonblock(sockfd);
rc = connect(sockfd, serv_addr, addrlen);
if (rc == 0)
if (rc == 0) {
unset_nonblock(sockfd);
return (0);
}
if (errno != EINPROGRESS)
return (-1);
@ -277,6 +277,7 @@ timeout_connect(int sockfd, const struct sockaddr *serv_addr,
break;
}
result = 0;
unset_nonblock(sockfd);
break;
default:
/* Should not occur */