[Bug 343] New: Only try connect to first address when creating tunnel
bugzilla-daemon at mindrot.org
bugzilla-daemon at mindrot.org
Tue Jul 9 04:08:27 EST 2002
http://bugzilla.mindrot.org/show_bug.cgi?id=343
Summary: Only try connect to first address when creating tunnel
Product: Portable OpenSSH
Version: -current
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: sshd
AssignedTo: openssh-unix-dev at mindrot.org
ReportedBy: stig at venaas.com
In connect_to() in channels.c there is a loop trying to connect to each
address returned by getaddrinfo() until connect() is successful or
EINPROGRESS is returned. The socket is non-blocking so unless something
immediately fails, EINPROGRESS is returned and we happily leave the loop.
Then when we later attempt to write to the socket, we realize that we're
not connected. No route to host, connection refused etc. I would like
sshd to try another address if possible when this happens. Or in other
words, loop through all candidates until we are absolutely positive we
have established a connection. I think this can be done by selecting
the socket for writing without actually writing anything. I'm happy to
elaborate why this is a real life problem if necessary.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the openssh-unix-dev
mailing list