From: David Carlier Date: Sat, 24 Apr 2021 15:13:26 +0000 (+0100) Subject: BIO_listen: disable setting ipv6_v6only on OpenBSD as it is a read only data and... X-Git-Tag: openssl-3.0.0-alpha17~204 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f7f0632b01cf16efccb133e395cf115c194bd003;p=thirdparty%2Fopenssl.git BIO_listen: disable setting ipv6_v6only on OpenBSD as it is a read only data and true Reviewed-by: Tomas Mraz Reviewed-by: Ben Kaduk (Merged from https://github.com/openssl/openssl/pull/15015) --- diff --git a/crypto/bio/b_sock2.c b/crypto/bio/b_sock2.c index 0446e7fd8db..f13f20148bb 100644 --- a/crypto/bio/b_sock2.c +++ b/crypto/bio/b_sock2.c @@ -264,7 +264,8 @@ int BIO_listen(int sock, const BIO_ADDR *addr, int options) } } -# ifdef IPV6_V6ONLY + /* On OpenBSD it is always ipv6 only with ipv6 sockets thus read-only */ +# if defined(IPV6_V6ONLY) && !defined(__OpenBSD__) if (BIO_ADDR_family(addr) == AF_INET6) { /* * Note: Windows default of IPV6_V6ONLY is ON, and Linux is OFF.