search for: timeout_m

Displaying 20 results from an estimated 46 matches for "timeout_m".

Did you mean: timeout_ms
2018 Feb 23
6
RFC 8305 Happy Eyeballs in OpenSSH
...he next connection attempt [...] recommended value for a + * default delay is 250 milliseconds. + */ +#define CONNECTION_ATTEMPT_DELAY 250 + static int -timeout_connect(int sockfd, const struct sockaddr *serv_addr, - socklen_t addrlen, int *timeoutp) +ssh_connect_timeout(struct timeval *tv, int timeout_ms) { - int optval = 0; - socklen_t optlen = sizeof(optval); + if (timeout_ms <= 0) + return 0; + ms_subtract_diff(tv, &timeout_ms); + return timeout_ms <= 0; +} - /* No timeout: just do a blocking connect() */ - if (*timeoutp <= 0) - return connect(sockfd, serv_addr, addrlen); - -...
2003 Apr 29
0
[PATCH] Add configurable timeout to ipconfig
...tart; pkt_fd = packet_open(); if (pkt_fd == -1) { @@ -281,6 +283,7 @@ fds[0].events = POLLRDNORM; gettimeofday(&now, NULL); + start = now.tv_sec; while (1) { int timeout = 60; int pending = 0; @@ -308,8 +311,8 @@ for (x = 0; x < 2; x++) { int delta_ms; - if (timeout_ms <= 0) - timeout_ms = 1; + if (timeout_ms <= 0 || loop_timeout == 0) + timeout_ms = 100; nr = poll(fds, NR_FDS, timeout_ms); prev = now; @@ -319,6 +322,14 @@ do_pkt_recv(pkt_fd, now.tv_sec) == 1) { break; } + + if (loop_timeout >= 0 && + n...
2010 Nov 28
2
[PATCH] Use canonical hostname for DNS SSHFP lookup
...sh/roaming_client.c openssh-sshfp/roaming_client.c --- openssh/roaming_client.c 2010-01-26 02:53:06.000000000 +0100 +++ openssh-sshfp/roaming_client.c 2010-11-28 09:49:06.626052834 +0100 @@ -263,7 +263,7 @@ if (ssh_connect(host, &hostaddr, options.port, options.address_family, 1, &timeout_ms, options.tcp_keep_alive, options.use_privileged_port, - options.proxy_command) == 0 && roaming_resume() == 0) { + options.proxy_command, NULL) == 0 && roaming_resume() == 0) { packet_restore_state(); reenter_guard = 0; fprintf(stderr, "[connection...
2017 Jan 12
3
proposed change to ssh_connect_direct()
On Sat, Jan 7, 2017 at 2:30 PM, Peter Moody <mindrot at hda3.com> wrote: > so I spent a bit of time looking at this and it seems like the only > way to go, at least if I want to keep it in ssh_connect_direct(), is > to use pthreads. further, it seems like getting that accepted is > something of a long shot: Sorry, pthreads is a non-starter. I would have thought that using
2003 Apr 29
0
[PATCH] Fix busy-looping behaviour in ipconfig
...fd; int nr = 0; - time_t now; + struct timeval now, prev; pkt_fd = packet_open(); if (pkt_fd == -1) { @@ -265,10 +280,12 @@ fds[0].fd = pkt_fd; fds[0].events = POLLRDNORM; - now = time(NULL); + gettimeofday(&now, NULL); while (1) { int timeout = 60; int pending = 0; + int timeout_ms; + int x; for (s = slist; s; s = s->next) { if (s->state == DEVST_COMPLETE) @@ -276,24 +293,41 @@ pending++; - if (s->expire - now <= 0) - process_timeout_event(s, now); + if (s->expire - now.tv_sec <= 0) + process_timeout_event(s, now.tv_sec); - i...
2018 Dec 10
2
[PATCH] cleanup of global variables server/client_version_string in sshconnect.c
...ng %.100s", client_version_string); + chop(*client_version_stringp); + debug("Local version string %.100s", *client_version_stringp); } /* @@ -622,7 +620,7 @@ send_client_banner(int connection_out, int minor1) * identification string. */ void -ssh_exchange_identification(int timeout_ms) +ssh_exchange_identification(int timeout_ms, char **client_version_stringp, char **server_version_stringp) { char buf[256], remote_version[256]; /* must be same size! */ int remote_major, remote_minor, mismatch; @@ -632,7 +630,7 @@ ssh_exchange_identification(int timeout_ms) size_t len;...
2017 Feb 04
0
[PATCH] ipconfig: handle multiple interfaces correctly
...* n_devices); + if (!fds) { + fprintf(stderr, "malloc failed\n"); + rc = -1; + goto bail; } - fds[0].fd = pkt_fd; - fds[0].events = POLLRDNORM; + memset(fds, 0, sizeof(*fds)); gettimeofday(&now, NULL); start = now.tv_sec; @@ -412,9 +416,12 @@ static int loop(void) int timeout_ms; int x; - for (s = slist; s; s = s->next) { + for (i = 0, s = slist; s; s = s->next, i++) { dprintf("%s: state = %d\n", s->dev->name, s->state); + fds[i].fd = s->dev->pkt_fd; + fds[i].events = POLLRDNORM; + if (s->state == DEVST_COMPLETE) {...
2019 Jan 18
0
[klibc:master] ipconfig: handle multiple interfaces correctly
...* n_devices); + if (!fds) { + fprintf(stderr, "malloc failed\n"); + rc = -1; + goto bail; } - fds[0].fd = pkt_fd; - fds[0].events = POLLRDNORM; + memset(fds, 0, sizeof(*fds)); gettimeofday(&now, NULL); start = now.tv_sec; @@ -412,9 +416,12 @@ static int loop(void) int timeout_ms; int x; - for (s = slist; s; s = s->next) { + for (i = 0, s = slist; s; s = s->next, i++) { dprintf("%s: state = %d\n", s->dev->name, s->state); + fds[i].fd = s->dev->pkt_fd; + fds[i].events = POLLRDNORM; + if (s->state == DEVST_COMPLETE) {...
2013 Oct 07
4
Feature request: FQDN Host match
Hello! I'm hoping that Gmail won't HTML format this mail so that I'll get flamed :) Anyway, my question relates to ssh_config. The problem I find is that the Host pattern is only applied to the argument given on the command line, as outlined in the man page: "The host is the hostname argument given on the command line (i.e. the name is not converted to a canonicalized host name
2015 May 23
5
Name based SSH proxy
...h-6.6p1/roaming_client.c --- openssh-6.6p1/roaming_client.c.original 2014-01-10 00:58:53.000000000 +0100 +++ openssh-6.6p1/roaming_client.c 2015-05-23 12:58:12.193450191 +0200 @@ -147,7 +147,7 @@ roaming_resume(void) resume_in_progress = 1; /* Exchange banners */ - ssh_exchange_identification(timeout_ms); + ssh_exchange_identification(timeout_ms, ""); packet_set_nonblocking(); /* Send a kexinit message with resume at appgate.com as only kex algo */ diff -up openssh-6.6p1/sshconnect.c.original openssh-6.6p1/sshconnect.c --- openssh-6.6p1/sshconnect.c.original 2015-05-23 11:56:55.23...
2018 Feb 27
2
tinc 1.1: missing PONG
...IMUM_WAIT_EVENTS]; + io_t *io_map[WSA_MAXIMUM_WAIT_EVENTS]; DWORD event_index = 0; for splay_each(io_t, io, &io_tree) { events[event_index] = io->event; + io_map[event_index] = io; event_index++; } - DWORD result = WSAWaitForMultipleEvents(event_count, events, FALSE, timeout_ms, FALSE); + /* + * If the generation number changes due to event removal + * by a callback we restart the loop. + * Note that event_count may be changed by callabcks. + */ + curgen = io_tree.generation; + DWORD num_events = event_count; - WSAEVENT event; + for(DWORD event_offset = 0;...
2017 Dec 31
4
[PATCH klibc 0/4] Fixes from Debian and Ubuntu
The following patches come from Debian and/or Ubuntu packages of klibc. Ben. Ben Hutchings (1): [klibc] run-init: Add dry-run mode Jay Vosburgh (1): [klibc] ipconfig: Use separate sockets for DHCP from multiple interfaces Mathieu Trudel-Lapierre (1): [klibc] ipconfig: Set broadcast when sending DHCPREQUEST and DHCPDISCOVER YunQiang Su (1): [klibc] mips: setjmp.S: don't
2018 Feb 14
0
[PATCH 3/4] iommu/virtio: Add event queue
...= virtqueue_get_buf(vq, &len)) != NULL) { if (req != pending) { dev_warn(viommu->dev, "discarding stale request\n"); continue; @@ -201,6 +218,7 @@ static int _viommu_send_reqs_sync(struct viommu_dev *viommu, * up the CPU in case of a device bug. */ unsigned long timeout_ms = 1000; + struct virtqueue *vq = viommu->vqs[VIOMMU_REQUEST_VQ]; *nr_sent = 0; @@ -210,15 +228,14 @@ static int _viommu_send_reqs_sync(struct viommu_dev *viommu, sg[0] = &req->top; sg[1] = &req->bottom; - ret = virtqueue_add_sgs(viommu->vq, sg, 1, 1, req, - G...
2017 Nov 17
0
[RFC PATCH v2 3/5] iommu/virtio-iommu: Add event queue
...len)) != NULL) { + while ((req = virtqueue_get_buf(vq, &len)) != NULL) { if (req != pending) { dev_warn(viommu->dev, "discarding stale request\n"); continue; @@ -202,6 +218,7 @@ static int _viommu_send_reqs_sync(struct viommu_dev *viommu, * dies. */ unsigned long timeout_ms = 1000; + struct virtqueue *vq = viommu->vqs[VIOMMU_REQUEST_VQ]; *nr_sent = 0; @@ -211,15 +228,14 @@ static int _viommu_send_reqs_sync(struct viommu_dev *viommu, sg[0] = &req->top; sg[1] = &req->bottom; - ret = virtqueue_add_sgs(viommu->vq, sg, 1, 1, req, - G...
2024 Apr 25
1
[PATCH] Enable ssh_config to set LogPath option (-E)
...char **log_verbose; int port; /* Port to connect. */ diff --git a/ssh.c b/ssh.c index 0019281f4..f38c96f7d 100644 --- a/ssh.c +++ b/ssh.c @@ -670,7 +670,7 @@ main(int ac, char **av) struct ssh *ssh = NULL; int i, r, opt, exit_status, use_syslog, direct, timeout_ms; int was_addr, config_test = 0, opt_terminated = 0, want_final_pass = 0; - char *p, *cp, *line, *argv0, *logfile; + char *p, *cp, *line, *argv0; char cname[NI_MAXHOST], thishost[NI_MAXHOST]; struct stat st; struct passwd *pw; @@ -741,7 +741,6 @@ main(int...
2018 Jan 16
1
[RFC PATCH v2 3/5] iommu/virtio-iommu: Add event queue
...rtqueue_get_buf(vq, &len)) != NULL) { > if (req != pending) { > dev_warn(viommu->dev, "discarding stale request\n"); > continue; > @@ -202,6 +218,7 @@ static int _viommu_send_reqs_sync(struct viommu_dev *viommu, > * dies. > */ > unsigned long timeout_ms = 1000; > + struct virtqueue *vq = viommu->vqs[VIOMMU_REQUEST_VQ]; > > *nr_sent = 0; > > @@ -211,15 +228,14 @@ static int _viommu_send_reqs_sync(struct viommu_dev *viommu, > sg[0] = &req->top; > sg[1] = &req->bottom; > > - ret = virtqueue_...
2004 May 29
1
[patch] Filename conversion
...ns: + * - read_fd is nonnegative and has data to read + * - write_fd is nonnegative and can be written to + * - something terrible happened to either + * - the timeout (in milliseconds) has elapsed + * Return value is zero iff the timeout occured. + */ +char await_fds(int read_fd, int write_fd, int timeout_ms) +{ + fd_set read_fds, write_fds, except_fds; + struct timeval tv; + int res; + + tv.tv_sec = timeout_ms/1000; + tv.tv_usec = (timeout_ms%1000)*1000; + + while (1) { + FD_ZERO(&read_fds); + FD_ZERO(&write_fds); + FD_ZERO(&except_fds); + if (write_fd>=0) { + FD_SET(writ...
2005 Jan 15
1
SayDigits -- ToneDigits??
I have a user who wants to receive an ANI spitback in DTMF. Right now, the "SayDigits(${CALLERIDNUM})" command works fine with voice. But I'd like to end up doing both. Something along the lines of: exten => 34,1,Answer exten => 34,2,Wait(1) exten => 34,3,Playback(vm-extension) exten => 34,4,SayDigits(${CALLERIDNUM}) exten => 34,5,Wait(2) exten =>
2005 Jan 06
0
skip unconnected interfaces
...o done; + } + + i = read(fd, &p, sizeof(p) - 1); + close(fd); + if (i < 0) { + perror(t); + goto done; + } + p[i] = '\0'; + *val = strtoul(p, NULL, 0); + + rc = 0; + done: + return rc; +} + static int loop(void) { #define NR_FDS 1 @@ -316,11 +349,27 @@ int pending = 0; int timeout_ms; int x; + unsigned long carrier; for (s = slist; s; s = s->next) { if (s->state == DEVST_COMPLETE) continue; + /* + * If we only want to configure net devices that + * are connected and it's been 10 seconds then + * ignore devices that don't have carrie...
2011 Jan 05
0
[PATCH] fix %n expansion in LocalCommand
...c690ae..a11e0ae 100644 --- a/ssh.c +++ b/ssh.c @@ -221,7 +221,7 @@ int main(int ac, char **av) { int i, r, opt, exit_status, use_syslog; - char *p, *cp, *line, *argv0, buf[MAXPATHLEN]; + char *p, *cp, *line, *argv0, buf[MAXPATHLEN], *host_arg; struct stat st; struct passwd *pw; int dummy, timeout_ms; @@ -693,6 +693,8 @@ main(int ac, char **av) options.port = sp ? ntohs(sp->s_port) : SSH_DEFAULT_PORT; } + /* preserve host name given on command line for %n expansion */ + host_arg = host; if (options.hostname != NULL) { host = percent_expand(options.hostname, "h",...