Displaying 2 results from an estimated 2 matches for "clear_cached_addr".
2014 Jul 16
1
ssh - Connection closed by UNKNOWN
Hi,
ssh clients shows "closed by UNKNOWN" message when a socket is closed by a
remote side 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
2012 Nov 24
0
ssh-keyscan continuity patch --
...* 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);
+/*
+ * Use our "timeout" value to set the maximum allowed wait time for data
+ * to become available in the `packet.c:packet_read_seqnr()' function.
+ */
+ packet_set_timeout(timeout, 1);
+...