Displaying 3 results from an estimated 3 matches for "monotime_tv".
2018 Dec 09
2
[PATCH] Enable ConnectTimeout with ConnectionAttempts
..., 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 = errno;
@@ -473,6 +474,7 @@ waitrfd(int fd, int *timeoutp)
}
/* timeout */
errno = ETIMEDOUT;
+ *timeoutp = next_timeout;
return -1...
[Bug 3585] New: "misc.h" required when build the sk middleware ("sk-usbhid.c") as standalone library
2023 Jul 02
0
[Bug 3585] New: "misc.h" required when build the sk middleware ("sk-usbhid.c") as standalone library
...t
"8a6cd08850f576e7527c52a1b086cae82fab290e"
Someone might want to build "sk-usbhid.c" as standalone middle library
for OpenSSH with `?without-security-key-builtin` distributed by
vendors.
When built "sk-usbhid.c" with SK_STANDALONE, "misc.h" is needed for
`monotime_tv`.
Workaround is in patch. Someone who want to build the middleware as
standalone library also need to link "sk-usbhid.o" with "libssh.a"(or
"misc.o").
--
You are receiving this mail because:
You are watching the assignee of the bug.
2018 Feb 23
6
RFC 8305 Happy Eyeballs in OpenSSH
...ock(sock);
+ if (connect(sock, ai->ai_addr, ai->ai_addrlen) < 0 &&
+ errno != EINPROGRESS) {
+ error("connect to address %s port %s: %s",
+ ntop, strport, strerror(errno));
+ errno = 0;
+ close(sock);
return -1;
}
- unset_nonblock(sockfd);
- return 0;
+ monotime_tv(initiate);
+ FD_SET(sock, fds);
+ *nfds = MAXIMUM(*nfds, sock + 1);
+ return 1;
+}
+
+static int
+ssh_connect_happy_eyeballs_process(int *nfds, fd_set *fds,
+ struct addrinfo *fd_ai[],
+ int ready, fd_set *wfds)
+{
+ socklen_t optlen;
+ int sock, optval = 0;
+ char ntop[NI_MAXHOST], str...