mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-24 01:05:41 +00:00
Retransmit only on last message from prev flight
Be a good network citizen, try to avoid causing congestion by causing a retransmission explosion.
This commit is contained in:
parent
8a7cf2543a
commit
fc572dd4f6
|
@ -2753,8 +2753,10 @@ static int ssl_prepare_handshake_record( ssl_context *ssl )
|
||||||
if( ssl->handshake != NULL &&
|
if( ssl->handshake != NULL &&
|
||||||
recv_msg_seq != ssl->handshake->in_msg_seq )
|
recv_msg_seq != ssl->handshake->in_msg_seq )
|
||||||
{
|
{
|
||||||
/* No sane server ever retransmits HelloVerifyRequest */
|
/* Retransmit only on last message from previous flight, to avoid
|
||||||
if( recv_msg_seq < ssl->handshake->in_flight_start_seq &&
|
* too many retransmissions.
|
||||||
|
* Besides, No sane server ever retransmits HelloVerifyRequest */
|
||||||
|
if( recv_msg_seq == ssl->handshake->in_flight_start_seq - 1 &&
|
||||||
ssl->in_msg[0] != SSL_HS_HELLO_VERIFY_REQUEST )
|
ssl->in_msg[0] != SSL_HS_HELLO_VERIFY_REQUEST )
|
||||||
{
|
{
|
||||||
SSL_DEBUG_MSG( 2, ( "received message from last flight, "
|
SSL_DEBUG_MSG( 2, ( "received message from last flight, "
|
||||||
|
|
Loading…
Reference in a new issue