Mercurial > dropbear
comparison common-session.c @ 1139:43a8ea69b24c
Fix problem where auth timeout wasn't checked when waiting for ident
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 03 Aug 2015 21:59:40 +0800 |
parents | 6aeadee3f16b |
children | f6d3a16ecc71 |
comparison
equal
deleted
inserted
replaced
1138:cc3916a7afd9 | 1139:43a8ea69b24c |
---|---|
74 ses.socket_prio = DROPBEAR_PRIO_DEFAULT; | 74 ses.socket_prio = DROPBEAR_PRIO_DEFAULT; |
75 /* Sets it to lowdelay */ | 75 /* Sets it to lowdelay */ |
76 update_channel_prio(); | 76 update_channel_prio(); |
77 | 77 |
78 now = monotonic_now(); | 78 now = monotonic_now(); |
79 ses.connect_time = now; | |
79 ses.last_packet_time_keepalive_recv = now; | 80 ses.last_packet_time_keepalive_recv = now; |
80 ses.last_packet_time_idle = now; | 81 ses.last_packet_time_idle = now; |
81 ses.last_packet_time_any_sent = 0; | 82 ses.last_packet_time_any_sent = 0; |
82 ses.last_packet_time_keepalive_sent = 0; | 83 ses.last_packet_time_keepalive_sent = 0; |
83 | 84 |
484 static void checktimeouts() { | 485 static void checktimeouts() { |
485 | 486 |
486 time_t now; | 487 time_t now; |
487 now = monotonic_now(); | 488 now = monotonic_now(); |
488 | 489 |
490 if (IS_DROPBEAR_SERVER && ses.connect_time != 0 | |
491 && now - ses.connect_time >= AUTH_TIMEOUT) { | |
492 dropbear_close("Timeout before auth"); | |
493 } | |
494 | |
489 /* we can't rekey if we haven't done remote ident exchange yet */ | 495 /* we can't rekey if we haven't done remote ident exchange yet */ |
490 if (ses.remoteident == NULL) { | 496 if (ses.remoteident == NULL) { |
491 return; | 497 return; |
492 } | 498 } |
493 | 499 |