asio_dtls icon indicating copy to clipboard operation
asio_dtls copied to clipboard

Issue with retransmission during handshake

Open nx7400 opened this issue 6 years ago • 1 comments

Hi, I observe incorrect retransmission behaviors during handshake.

  1. The first case is sending a retransmission when it is not needed because the server response comes in less than 1 second. image Additionally, the retransmission is sent at a completely unanticipated moment of the handshake.

  2. The second case is not sending the retransmission at the right moment when the server needs more than 1 second to respond. image Here too, the retransmission is sent at unanticipated moment.

  3. The third case also contains a issue with retransmission but additionally Client dose not respond to the Server Hello Done message. image

In my application I use your DTLS code only for DTLS Clients. Server part is an independent application that uses plain OpenSSL in version 1.1.1d. In the cases described above I use 5 such Clients that try to connect to the server.

I did quite detailed review of your code in search of the issue but failed to find the cause. Do you have any idea what the issue might be or what I am doing wrong?

nx7400 avatar Sep 18 '20 07:09 nx7400

Sorry for the late response.

This is a bug in asio_dtls which I don't know how to fix. On the fix_handshake_timeouts branch I have a Fix which has the following downsides:

  • timeout in handshake returns "Connection timed out" which is only somewhat correct
  • the timeout closes the Socket (cancel would be an alternative, with some new downsides)

Could you please confirm that this fixes the issue (aside from the above mentioned Problems)?

sdamm avatar Sep 24 '20 00:09 sdamm