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:31:35 +0000 (09:31 -0700)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/15015)

crypto/bio/b_sock2.c

index 0446e7fd8dbc5f2ba4c11c84d2e1c8659742ac51..f13f20148bbebd2a83feb23a019686ab081b0d28 100644 (file)
@@ -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.