[dtls] map OT errors from send callback to MBEDTLS_ERR_NET_SEND_FAILED (#3259)

Credit to OSS-Fuzz.
This commit is contained in:
Jonathan Hui
2018-11-03 08:08:58 -07:00
committed by GitHub
parent cb1b4c72a8
commit 7518eb1fb8
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -534,7 +534,8 @@ int Dtls::HandleMbedtlsTransmit(const unsigned char *aBuf, size_t aLength)
break;
default:
assert(false);
otLogWarnMeshCoP("Dtls::HandleMbedtlsTransmit: %s error", otThreadErrorToString(error));
rval = MBEDTLS_ERR_NET_SEND_FAILED;
break;
}
+1
View File
@@ -41,6 +41,7 @@
#include <mbedtls/entropy.h>
#include <mbedtls/entropy_poll.h>
#include <mbedtls/error.h>
#include <mbedtls/net_sockets.h>
#include <mbedtls/ssl.h>
#include <mbedtls/ssl_cookie.h>