Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matt Johnston
dropbear
Commits
81743004
Commit
81743004
authored
Apr 29, 2016
by
Matt Johnston
Browse files
Avoid busy loop while waiting for rekey response
parent
a453b061
Changes
1
Hide whitespace changes
Inline
Side-by-side
common-session.c
View file @
81743004
...
...
@@ -550,10 +550,12 @@ static void update_timeout(long limit, long now, long last_event, long * timeout
static
long
select_timeout
()
{
/* determine the minimum timeout that might be required, so
as to avoid waking when unneccessary */
long
timeout
=
LONG_MAX
;
long
timeout
=
KEX_REKEY_TIMEOUT
;
long
now
=
monotonic_now
();
update_timeout
(
KEX_REKEY_TIMEOUT
,
now
,
ses
.
kexstate
.
lastkextime
,
&
timeout
);
if
(
!
ses
.
kexstate
.
sentkexinit
)
{
update_timeout
(
KEX_REKEY_TIMEOUT
,
now
,
ses
.
kexstate
.
lastkextime
,
&
timeout
);
}
if
(
ses
.
authstate
.
authdone
!=
1
&&
IS_DROPBEAR_SERVER
)
{
/* AUTH_TIMEOUT is only relevant before authdone */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment