Displaying 7 results from an estimated 7 matches for "canonical_host_ip".
2014 Jul 16
1
ssh - Connection closed by UNKNOWN
...while ssh is waiting for user's password:
$ ssh user at localhost
user at localhost's password:
Connection closed by UNKNOWN
When the packet_read_seqnr() calls get_remote_ipaddr(), a connection's
socket is already closed and there's not been any other call of this function
yet so canonical_host_ip from canohost.c is still NULL and the function
returns "UNKNOWN". I think that it could be workarounded by calling get_remote_ipaddr() right
after packet_set_connection(), e.g. using another debug message, see bellow, or
there could be set_remote_ipaddr() in canonhost.c for that.
--- a/s...
2001 Oct 13
0
local IP in environment
...-----------
*** openssh-2.9.9p2/canohost.c.bak Sun Jun 24 22:01:24 2001
--- openssh-2.9.9p2/canohost.c Fri Oct 12 16:52:09 2001
***************
*** 255,260 ****
--- 255,281 ----
return get_socket_address(socket, 0, NI_NAMEREQD);
}
+ const char *
+ get_local_ipaddr2(void)
+ {
+ static char *canonical_host_ip = NULL;
+
+ /* Check whether we have cached the ipaddr. */
+ if (canonical_host_ip == NULL) {
+ if (packet_connection_is_on_socket()) {
+ canonical_host_ip =
+ get_local_ipaddr(packet_get_connection_out());
+ if (canonical_host_ip == NULL)
+ fatal_cleanup();
+ } else {
+...
2002 Sep 21
4
OpenSSH -current fails regression on Solaris 8, sshd dumps core
...ess(socket, 1, NI_NUMERICHOST);
}
-char *
-get_local_ipaddr(int socket)
+/*
+ * Returns the IP-address of the local host as a string. The returned
+ * string must not be freed.
+ */
+
+const char *
+get_local_ipaddr(void)
{
- return get_socket_address(socket, 0, NI_NUMERICHOST);
+ static char *canonical_host_ip = NULL;
+
+ /* Check whether we have cached the ipaddr. */
+ if (canonical_host_ip == NULL) {
+ if (packet_connection_is_on_socket()) {
+ canonical_host_ip =
+ get_socket_address(packet_get_connection_in(), 0, NI_NUMERICHOST);
+ if (canonical_host_ip == NULL)
+ fatal_cleanup();
+ } e...
2014 Jul 18
2
[Bug 2256] New: ssh - Connection closed by UNKNOWN
...while ssh is waiting for user's password:
$ ssh user at localhost
user at localhost's password:
Connection closed by UNKNOWN
When the packet_read_seqnr() calls get_remote_ipaddr(), a connection's
socket is already closed and there's not been any other call of this
function
yet so canonical_host_ip from canohost.c is still NULL and the function
returns "UNKNOWN". I think that it could be workarounded by calling
get_remote_ipaddr() right
after packet_set_connection(), e.g. using another debug message, see
bellow, or
there could be set_remote_ipaddr() in canonhost.c for that.
--
You...
2014 Jul 18
6
[Bug 2257] New: ssh - Connection closed by UNKNOWN
...while ssh is waiting for user's password:
$ ssh user at localhost
user at localhost's password:
Connection closed by UNKNOWN
When the packet_read_seqnr() calls get_remote_ipaddr(), a connection's
socket is already closed and there's not been any other call of this
function
yet so canonical_host_ip from canohost.c is still NULL and the function
returns "UNKNOWN". I think that it could be workarounded by calling
get_remote_ipaddr() right
after packet_set_connection(), e.g. using another debug message, or
there could be set_remote_ipaddr() in canonhost.c for that.
--
You are receivi...
2012 Nov 24
0
ssh-keyscan continuity patch --
...fd;
#define MAXCON (maxfd - 10)
extern char *__progname;
+extern int connclosed;
+extern int conntimedout;
fd_set *read_wait;
size_t read_wait_nfdset;
int ncon;
@@ -243,7 +249,23 @@
{
int j;
+/*
+ * New fd and socket. Clear the possibly cached IP-address of the
+ * remote host (kex.c:canonical_host_ip) of the previous socket. Also
+ * clear the packet_read_seqnr() "Connection closed ..." and "Connection
+ * to ... timed out ..." flags (called by dispatch_run()).
+ */
+ clear_cached_addr();
+ connclosed = 0;
+ conntimedout = 0;
+
packet_set_connection(c->c_fd, c->c_fd...
2000 Jan 19
3
AIX openssh patches
...ng fromlen;
+ #else
int fromlen;
+ #endif
int in = packet_get_connection_in();
int out = packet_get_connection_out();
***************
*** 197,203 ****
get_remote_ipaddr()
{
struct sockaddr_in from;
! int fromlen, socket;
/* Check whether we have chached the name. */
if (canonical_host_ip != NULL)
--- 211,222 ----
get_remote_ipaddr()
{
struct sockaddr_in from;
! #ifdef _AIX
! unsigned long fromlen;
! #else
! int fromlen;
! #endif
! int socket;
/* Check whether we have chached the name. */
if (canonical_host_ip != NULL)
***************
*** 231,237 ****
--- 250,260...