From: Hugo Landau Date: Wed, 9 Aug 2023 16:46:32 +0000 (+0100) Subject: BIO_s_connect: Support configuration of non-blocking mode in datagram mode X-Git-Tag: openssl-3.2.0-alpha1~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=533254eeb31efa46a9011665712e47b56a2fe720;p=thirdparty%2Fopenssl.git 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) --- diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c index 865a4d4cd42..0f9cba06da3 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: