Closed anhu closed 1 day ago
The relevant user_settings.h defines are:
WOLFSSL_DTLS
WOLFSSL_NO_SOCK
USE_WOLFSSL_IO
If allowing WOLFSSL_NO_SOCK and USE_WOLFSSL_IO at the same time then we need to have isDGramSock return correctly.
Previous versions (back to v5.4.0) we did the following in EmbedSendTo and did not have a isDGramSock internal API:
if (getsockopt(sd, SOL_SOCKET, SO_TYPE, &type, &length) == 0 &&
type != SOCK_DGRAM) {
/* Probably a TCP socket. peer and peerSz MUST be NULL and 0 */
}
I think a more complete fix is either we make an assumption on the type for XSOCKOPT_TYPE_OPTVAL_TYPE when not already defined. Or if the user is setting up custom socket calls with they define it.
With either fix though we should add a user_settings.h config file to our CI testing that builds this use case if supporting it going forward.
Closing. This will be handled by another engineer.
In that case, simply return false.
Fixes ZD18962