mirror of
https://github.com/clearml/dropbear
synced 2025-06-26 18:17:32 +00:00
Fix problem where auth timeout wasn't checked when waiting for ident
This commit is contained in:
@@ -76,6 +76,7 @@ void common_session_init(int sock_in, int sock_out) {
|
||||
update_channel_prio();
|
||||
|
||||
now = monotonic_now();
|
||||
ses.connect_time = now;
|
||||
ses.last_packet_time_keepalive_recv = now;
|
||||
ses.last_packet_time_idle = now;
|
||||
ses.last_packet_time_any_sent = 0;
|
||||
@@ -486,6 +487,11 @@ static void checktimeouts() {
|
||||
time_t now;
|
||||
now = monotonic_now();
|
||||
|
||||
if (IS_DROPBEAR_SERVER && ses.connect_time != 0
|
||||
&& now - ses.connect_time >= AUTH_TIMEOUT) {
|
||||
dropbear_close("Timeout before auth");
|
||||
}
|
||||
|
||||
/* we can't rekey if we haven't done remote ident exchange yet */
|
||||
if (ses.remoteident == NULL) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user