]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
BIO_listen: disable setting ipv6_v6only on OpenBSD as it is a read only data and...
authorDavid Carlier <devnexen@gmail.com>
Sat, 24 Apr 2021 15:13:26 +0000 (16:13 +0100)
committerBenjamin Kaduk <bkaduk@akamai.com>
Sun, 9 May 2021 16:48:29 +0000 (09:48 -0700)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/15015)

(cherry picked from commit f7f0632b01cf16efccb133e395cf115c194bd003)

crypto/bio/b_sock2.c

index 335dfabc6180dbfd5a1f1111704b94456a7a05c8..f54b550ecff2c2af5eb8547e8c404c86b284f0ef 100644 (file)
@@ -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.