sdamm / asio_dtls

A DTLS implementation using the ASIO library
51 stars 11 forks source link

Issue with retransmission during handshake #15

Open nx7400 opened 3 years ago

nx7400 commented 3 years ago

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?

sdamm commented 3 years ago

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:

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