search for: connection_in

Displaying 20 results from an estimated 47 matches for "connection_in".

Did you mean: connection_id
2013 Jul 10
1
connection_in and connection_out
Hi, I'm a newbie to openssh and was trying to read the source code recently. Could anyone tell me why in sshd the connection_in and connection_out are the same(seems to be integer 3 in my machine). connection_in is used in process_input(readset), and connection_out is used in process_output(writeset); But how does it work if it tries to read and write from the same file descriptor? /Bob
2001 Aug 20
1
Idletimeout patch, third attempt
...data. */ @@ -708,20 +790,21 @@ /* If we got a packet, return it. */ if (type != SSH_MSG_NONE) { xfree(setp); + idletimeout_check(type); return type; } /* * Otherwise, wait for some data to arrive, add it to the * buffer, and try again. */ - memset(setp, 0, howmany(connection_in + 1, NFDBITS) * - sizeof(fd_mask)); - FD_SET(connection_in, setp); - - /* Wait for some data to arrive. */ - while (select(connection_in + 1, setp, NULL, NULL, NULL) == -1 && - (errno == EAGAIN || errno == EINTR)) - ; + do { + memset(setp, 0, howmany(connection_i...
2001 Oct 31
2
suggested fix for the sigchld race
...dsetp); /* * If we have buffered packet data going to the client, mark that @@ -278,6 +319,8 @@ error("select: %.100s", strerror(errno)); } else if (ret == 0 && client_alive_scheduled) client_alive_check(); + + notify_done(*readsetp); } /* @@ -467,6 +510,8 @@ connection_in = packet_get_connection_in(); connection_out = packet_get_connection_out(); + notify_setup(); + previous_stdout_buffer_bytes = 0; /* Set approximate I/O buffer size. */ @@ -572,6 +617,7 @@ max_fd = MAX(max_fd, fdin); max_fd = MAX(max_fd, fdout); max_fd = MAX(max_fd, fderr); + ma...
2007 Jul 24
1
ssh client does not timeout if the network fails after ssh_connect but before ssh_exchange_identification, even with Alive options set
Hello, I am testing ssh with occasional network disconnection between server and client during these days. I found ssh sometimes hangs if the disconnection happens after the connection is established but before ssh_exchange_identification completes. The ssh configuration files show that both client and server alive options are set. In /etc/ssh/ssh_config: # Send keepalive messages to the server.
2000 Feb 14
0
[openssh-1.2.2] some porting notes for SunOS 4.1.4
...============= --- packet.c.orig-1.2.2 Sat Jan 22 17:38:00 2000 +++ packet.c Sun Feb 13 13:06:04 2000 @@ -796,22 +796,28 @@ * Set IP options for an interactive connection. Use * IPTOS_LOWDELAY and TCP_NODELAY. */ +#ifdef IPTOS_LOWDELAY int lowdelay = IPTOS_LOWDELAY; if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &lowdelay, sizeof(lowdelay)) < 0) error("setsockopt IPTOS_LOWDELAY: %.100s", strerror(errno)); +#endif /* IPTOS_LOWDELAY */ +#ifdef TCP_NODELAY if (setsockopt(connection_in, IPPROTO_TCP, TCP_NODELAY, (void *) &on, sizeof(on)) &...
2001 Sep 28
1
[PATCH] fix for Linux hang on exit bug in 2.9.9p2
...23:51:14 2001 +++ openssh-2.9.9p2J/clientloop.c Fri Sep 28 12:47:09 2001 @@ -84,6 +84,7 @@ /* import options */ extern Options options; +extern int no_tty_flag; /* Flag indicating that stdin should be redirected from /dev/null. */ extern int stdin_null_flag; @@ -122,7 +123,8 @@ static int connection_in; /* Connection to server (input). */ static int connection_out; /* Connection to server (output). */ static int need_rekeying; /* Set to non-zero if rekeying is requested. */ -static int session_closed = 0; /* In SSH2: login session closed. */ +enum SessionStatus {SessionOpen, SessionClose, Sessi...
2006 Apr 22
2
bug & patch in ServerAliveInterval (openssh 4.3-p2)
Hi openssh-unix-dev subscribers :) I have found that ServerAliveInterval & ServerAliveCountMax have some bug. Basically the ssh-alive check function (that verify the peer is alive) is called only if no data at all gets into ssh (when it should work only for server channel).I am pretty sure developers know about this ..anyway I have tried to fix this issue. Here is the patch: diff -rNu
2000 May 12
0
SunOS 4.x port
.../* Between login and logout */ log("No tty slot found at logout"); --- packet.c.DIST Fri May 5 11:55:05 2000 +++ packet.c Fri May 5 11:56:42 2000 @@ -1233,21 +1233,24 @@ * IPTOS_LOWDELAY and TCP_NODELAY. */ int lowdelay = IPTOS_LOWDELAY; +#ifdef IP_TOS if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &lowdelay, sizeof(lowdelay)) < 0) error("setsockopt IPTOS_LOWDELAY: %.100s", strerror(errno)); +#endif if (setsockopt(connection_in, IPPROTO_TCP, TCP_NODELAY, (void *) &on, sizeof(on)) < 0) error("setsockopt TCP_NOD...
2001 May 18
0
PATCH: implement delay (sleep) after last tunnelled connection exits
...wait forever. -- John Bowman University of Alberta http://www.math.ualberta.ca/~bowman diff -ur openssh-2.9p1/clientloop.c openssh-2.9p1S/clientloop.c --- openssh-2.9p1/clientloop.c Fri Apr 20 06:50:51 2001 +++ openssh-2.9p1S/clientloop.c Thu May 17 21:41:44 2001 @@ -121,8 +121,8 @@ static int connection_in; /* Connection to server (input). */ static int connection_out; /* Connection to server (output). */ static int need_rekeying; /* Set to non-zero if rekeying is requested. */ -static int session_closed = 0; /* In SSH2: login session closed. */ - +enum SessionStatus {SessionOpen, SessionClose, Ses...
2001 Sep 05
2
sshd hangs on logout -- is this a bug?
In the changelog, there is an entry: 20001129 - (djm) Back out all the serverloop.c hacks. sshd will now hang again if there are background children with open fds. Does this mean that this is regarded as expected (and correct) behavior, that should not change in the future, or does it mean that this behavior is a known problem that someone will eventually fix? --Adam -- Adam McKenna
2024 Jun 01
1
OpenSSH server doesn't log client disconnect without SSH_MSG_DISCONNECT
...out TCP wrappers and still no 'Connection > closed' at 'LogLevel INFO'. You might be hitting this exit path: diff --git a/serverloop.c b/serverloop.c index 4eabfced6..bf45f77a2 100644 --- a/serverloop.c +++ b/serverloop.c @@ -266,11 +266,11 @@ process_input(struct ssh *ssh, int connection_in) if (errno == EAGAIN || errno == EINTR || errno == EWOULDBLOCK) return 0; if (errno == EPIPE) { - verbose("Connection closed by %.100s port %d", + logit("Connection closed by %.100s port %d", ssh_remote_ipaddr(ssh), ssh_remote_port(ssh)); return -1;...
2000 Mar 01
0
Problem in sshconnect.c?
...ing. Any help you guys can give would be greatly appreciated. Regards, Paul Tiemann //------------- Here's a code snip from the sshconnect.c file below void ssh_exchange_identification() { char buf[256], remote_version[256]; /* must be same size! */ int remote_major, remote_minor, i; int connection_in = packet_get_connection_in(); int connection_out = packet_get_connection_out(); /* Read other side\'s version identification. */ for (i = 0; i < sizeof(buf) - 1; i++) { buf[i + 1] = 0; if (read(connection_in, &buf[i], 1) != 1) fatal("ssh_exchange_identification: read: %....
2003 Apr 09
1
[Bug 541] packet_set_interactive typo
...interactive() in packet.c appears to have changed from 3.5p1. It appears there may be a typographical error. Specifically, 3.6.1p1 shows: /* Only set socket options if using a socket. */ if (!packet_connection_is_on_socket()) if (interactive) set_nodelay(connection_in); when it is probably supposed to say: /* Only set socket options if using a socket. */ if (!packet_connection_is_on_socket()) return; if (interactive) set_nodelay(connection_in); In other words, it appears somebody accidentily deleted the &q...
2007 Mar 14
1
sshd gets stuck: select() in packet_read_seqnr waits indefinitely
Dear OpenSSH Portable sshd developers, I'm having a problem where sshd login sessions are occasionally (as often as once a day) getting stuck indefinitely. I enabled debug messages and got a backtrace of a stuck sshd, and I think I've found the bug. I wanted to run it by the list once before filing. sshd version: OpenSSH_4.2p1 FreeBSD-20050903, OpenSSL 0.9.7e-p1 25 Oct 2004
1999 Dec 06
1
Ugly patch to openssh-1.2pre15
...making + the real connection, so we have to swallow some lines before getting + the SSH-%d.%d identification string */ + #define FIREWALL_CHATTER_LINES 10 + /* Session id for the current session. */ unsigned char session_id[16]; *************** *** 896,902 **** --- 902,910 ---- int connection_in = packet_get_connection_in(); int connection_out = packet_get_connection_out(); extern Options options; + int chatter; + for (chatter = 0; chatter < FIREWALL_CHATTER_LINES; chatter++) { /* Read other side\'s version identification. */ for...
2013 Aug 02
9
[Bug 2139] New: re-exec fallback problem
https://bugzilla.mindrot.org/show_bug.cgi?id=2139 Bug ID: 2139 Summary: re-exec fallback problem Product: Portable OpenSSH Version: -current Hardware: Other OS: FreeBSD Status: NEW Severity: minor Priority: P5 Component: sshd Assignee: unassigned-bugs at mindrot.org
2001 May 04
19
SSH connection hanging on logout
I am running OpenSSH 2.9p1 on SunOS 5.7 w/4-24-2001 patch cluster. Like many other users I am seeing the hanging session on logout with background processes. This is a huge problem for me as I centrally manage 50+ machines with rdist across ssh. Instead of just complaining about the problem I thought I would put my CS degree to use and try to track down the problem myself. For starters,
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
2001 Nov 14
6
[PATCH]: Patch to fix hang on exit bug under Linux and add optional exit delay
...11 19:36:09 2001 +++ openssh-3.0p1J/clientloop.c Tue Nov 13 16:06:36 2001 @@ -84,6 +84,7 @@ /* import options */ extern Options options; +extern int no_tty_flag; /* Flag indicating that stdin should be redirected from /dev/null. */ extern int stdin_null_flag; @@ -122,7 +123,8 @@ static int connection_in; /* Connection to server (input). */ static int connection_out; /* Connection to server (output). */ static int need_rekeying; /* Set to non-zero if rekeying is requested. */ -static int session_closed = 0; /* In SSH2: login session closed. */ +enum SessionStatus {SessionOpen, SessionClose, Sessi...
2015 Jan 30
0
[Bug 1213] ssh-keyscan exits in mid-way
...ffffffe27c "blarg.internal.example.com,A.B.C.D") at ../ssh-keyscan.c:615 #8 0x00007ffff7f86f65 in main (argc=6, argv=0x7fffffffe778) at ../ssh-keyscan.c:781 For what it's worth, as far as the arguments to that select() call are concerned... (gdb) p state->connection_in $1 = 213 (gdb) p timeoutp $2 = (struct timeval *) 0x0 (I'll leave the session up in case you'd like me to poke around any further.) This is running on an RHEL 6.6 machine, should the network stack be called into question... -- You are receiving this mail because: You are wat...