From 533254eeb31efa46a9011665712e47b56a2fe720 Mon Sep 17 00:00:00 2001 From: Hugo Landau Date: Wed, 9 Aug 2023 17:46:32 +0100 Subject: BIO_s_connect: Support configuration of non-blocking mode in datagram mode Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/21715) --- crypto/bio/bss_conn.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c index 865a4d4cd4..0f9cba06da 100644 --- a/crypto/bio/bss_conn.c +++ b/crypto/bio/bss_conn.c @@ -610,6 +610,10 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr) data->connect_mode |= BIO_SOCK_NONBLOCK; else data->connect_mode &= ~BIO_SOCK_NONBLOCK; + + if (data->dgram_bio != NULL) + ret = BIO_set_nbio(data->dgram_bio, num); + break; #if defined(TCP_FASTOPEN) && !defined(OPENSSL_NO_TFO) case BIO_C_SET_TFO: -- cgit v1.2.3