DTLS: Clear userSet when peer is set in EmbedReceiveFrom

This allows us to differentiate between the user explicitly setting a peer and wolfio setting it. When wolfio sets the peer, we want to be able to update the peer address while in stateless parsing (governed by the `newPeer` variable).
This commit is contained in:
Juliusz Sosinowicz
2025-11-06 17:11:38 +01:00
parent 975033c64f
commit c2377fd266

View File

@@ -872,6 +872,7 @@ int EmbedReceiveFrom(WOLFSSL *ssl, char *buf, int sz, void *ctx)
/* Store size of saved address. Locking handled internally. */
if (wolfSSL_dtls_set_peer(ssl, peer, peerSz) != WOLFSSL_SUCCESS)
return WOLFSSL_CBIO_ERR_GENERAL;
dtlsCtx->userSet = 0;
}
#ifndef WOLFSSL_PEER_ADDRESS_CHANGES
else {