mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 04:34:41 +02:00
DTLS Nonblocking Updates
Do not allow the DTLS message flight be retransmit without being finished. This can happen if a non-blocking transmit times out the response and the application tries to retransmit.
This commit is contained in:
@@ -6090,6 +6090,18 @@ int DtlsMsgPoolSend(WOLFSSL* ssl, int sendOnlyFirstPacket)
|
||||
WOLFSSL_ENTER("DtlsMsgPoolSend()");
|
||||
|
||||
if (pool != NULL) {
|
||||
if ((ssl->options.side == WOLFSSL_SERVER_END &&
|
||||
!(ssl->options.acceptState == SERVER_HELLO_DONE ||
|
||||
ssl->options.acceptState == ACCEPT_FINISHED_DONE)) ||
|
||||
(ssl->options.side == WOLFSSL_CLIENT_END &&
|
||||
!(ssl->options.connectState == CLIENT_HELLO_SENT ||
|
||||
ssl->options.connectState == HELLO_AGAIN_REPLY ||
|
||||
ssl->options.connectState == FINISHED_DONE))) {
|
||||
|
||||
WOLFSSL_ERROR(DTLS_RETX_OVER_TX);
|
||||
ssl->error = DTLS_RETX_OVER_TX;
|
||||
return WOLFSSL_FATAL_ERROR;
|
||||
}
|
||||
|
||||
while (pool != NULL) {
|
||||
if (pool->seq == 0) {
|
||||
|
Reference in New Issue
Block a user