mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-01-29 13:42:12 +01:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user