Displaying 3 results from an estimated 3 matches for "waitrfd".
Did you mean:
waitfd
2018 Dec 09
2
[PATCH] Enable ConnectTimeout with ConnectionAttempts
...ly works on the first ConnectionAttempts
https://bugzilla.mindrot.org/show_bug.cgi?id=2918
---
sshconnect.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sshconnect.c b/sshconnect.c
index 4862da5e..b837a83a 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -454,11 +454,12 @@ waitrfd(int fd, int *timeoutp)
{
struct pollfd pfd;
struct timeval t_start;
- int oerrno, r;
+ int oerrno, r, next_timeout;
monotime_tv(&t_start);
pfd.fd = fd;
pfd.events = POLLIN;
+ next_timeout = *timeoutp;
for (; *timeoutp >= 0;) {
r = poll(&pfd, 1, *timeoutp);
oerrno = e...
2018 Feb 23
7
RFC 8305 Happy Eyeballs in OpenSSH
...(ai == NULL ||
+ !ssh_connect_timeout(initiate, CONNECTION_ATTEMPT_DELAY)))
+ /* Do not initiate new connections yet */
return 0;
- } else if (errno != EINPROGRESS)
+ if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6) {
+ errno = EAFNOSUPPORT;
return -1;
-
- if (waitrfd(sockfd, timeoutp) == -1)
+ }
+ if (getnameinfo(ai->ai_addr, ai->ai_addrlen,
+ ntop, sizeof(ntop),
+ strport, sizeof(strport),
+ NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
+ oerrno = errno;
+ error("%s: getnameinfo failed", __func__);
+ errno = oerrno;
return -1;
-
- /* Compl...
2018 Dec 10
2
[PATCH] cleanup of global variables server/client_version_string in sshconnect.c
In sshconnect.c there are two global variables for server_version_string
client_version_string.
These are used just in a few functions and can easily be passed as
parameters.
Also, there is a strange construct, where their memory is allocated to
the global pointers, then copies of these pointers are assigned to the
kex structure. The kex_free finally frees them via cleanup of the kex