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_1_1_1l~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=207b8693b0821aab356ce9dccb7f2fe86e5e035a;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) (cherry picked from commit f7f0632b01cf16efccb133e395cf115c194bd003) --- diff --git a/crypto/bio/b_sock2.c b/crypto/bio/b_sock2.c index 335dfabc618..f54b550ecff 100644 --- a/crypto/bio/b_sock2.c +++ b/crypto/bio/b_sock2.c @@ -243,7 +243,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.