Mercurial > dropbear
diff common-session.c @ 928:7cd89d4e0335
Add new monotonic_now() wrapper so that timeouts are unaffected by
system clock changes
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 13 Mar 2014 23:50:09 +0800 |
parents | 122fb3532038 |
children | 9d40ed1da686 |
line wrap: on
line diff
--- a/common-session.c Thu Mar 13 23:08:47 2014 +0800 +++ b/common-session.c Thu Mar 13 23:50:09 2014 +0800 @@ -397,8 +397,7 @@ static void checktimeouts() { time_t now; - - now = time(NULL); + now = monotonic_now(); if (ses.connect_time != 0 && now - ses.connect_time >= AUTH_TIMEOUT) { dropbear_close("Timeout before auth");