diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-08-09 17:46:32 +0100 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-09-01 10:45:34 +0100 |
commit | f3295bd80c44f0e202026ec856c73d8c9bb04670 (patch) | |
tree | 361d5145e56cfde1ce5a5d1dfda15a6254804735 | |
parent | 533254eeb31efa46a9011665712e47b56a2fe720 (diff) |
BIO_s_datagram: Support configuring non-blocking mode
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21715)
-rw-r--r-- | crypto/bio/bss_dgram.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c index b42e87b107..49cf56ad19 100644 --- a/crypto/bio/bss_dgram.c +++ b/crypto/bio/bss_dgram.c @@ -722,6 +722,10 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr) case BIO_CTRL_DGRAM_SET_PEER: BIO_ADDR_make(&data->peer, BIO_ADDR_sockaddr((BIO_ADDR *)ptr)); break; + case BIO_C_SET_NBIO: + if (!BIO_socket_nbio(b->num, num != 0)) + ret = 0; + break; case BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT: data->next_timeout = ossl_time_from_timeval(*(struct timeval *)ptr); break; |