Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DTLS handshake infinite loop #727

Closed
wants to merge 1 commit into from
Closed

Fix DTLS handshake infinite loop #727

wants to merge 1 commit into from

Conversation

NicFontana
Copy link

Fix DTLS handshake infinite loop caused by the client dropping packets different from Client Hello kind of packets.

This happens when it receives the Hello Verify Request after its resend timeout (initially set to 1000ms) expires.

Fix #726

…lient dropping packets different from Client Hello kind of packets.

This happens when it receives the Hello Verify Request after its resend timeout (initially set to 1000ms) expires.
@peterdettman peterdettman self-assigned this Jun 14, 2020
@peterdettman
Copy link
Collaborator

I think you've correctly identified readVersion handling as a problem, but it might be more straightforward to just not set it from HelloVerifyRequest recordVersion. The current code clears readVersion after it receives a HelloVerifyRequest message, but that clearing doesn't happen for retransmitted records.

@peterdettman
Copy link
Collaborator

I've fixed this by not setting readVersion from HelloVerifyRequest instead, but we have credited you with the initial fix.

@NicFontana NicFontana deleted the fix/dtls-handshake-loop branch June 14, 2020 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DTLS handshake gets stuck with high latency between the client and the server
2 participants