sipwise / rtpengine

The Sipwise media proxy for Kamailio
GNU General Public License v3.0
763 stars 360 forks source link

DTLS: last handshake flight cannot be retransmitted in rtpengine #1796

Open wenjuntest opened 4 months ago

wenjuntest commented 4 months ago

rtpengine version the issue has been seen with

No response

Used distribution and its version

No response

Linux kernel version used

No response

CPU architecture issue was seen on (see uname -m)

None

Expected behaviour you didn't see

As a DTLS server, RTP engine should retransmit the last flight to client if the last flight is lost on network.

Unexpected behaviour you saw

As a DTLS server, RTP engine does not retransmit the last flight to client if the last flight is lost on network. That will cause DTLS handshake failure.

Steps to reproduce the problem

Use an openssl as client, build DTLS connection with RTP engine, and set packet lost to 30% from RTP engine to client. sometimes, DTLS handshake cannot be built correctly.

Additional program output to the terminal or logs illustrating the issue

Same issue with detailed description: https://github.com/pion/dtls/issues/479

Anything else?

It is easily to fix this issue, RTPengine cache the last flight (type == SSL3_MT_NEWSESSION_TICKET) before sending to client, if client re-sends the last DTLS message to RTP engine, RTP engine can retransmit the cached last flight to client.