Fix statless session resumption so it can coexist with SNI
[openssl.git] / e_os.h
diff --git a/e_os.h b/e_os.h
index 3fbfe8e0ba69c3badc359d1057542dc3a21f0587..0f4b7994f55efb5f964e225c24c7d349ddeb6ab2 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -624,6 +624,18 @@ static unsigned int _strlen31(const char *str)
 #    define INVALID_SOCKET     (-1)
 #    endif /* INVALID_SOCKET */
 #  endif
+
+/* Some IPv6 implementations are broken, disable them in known bad
+ * versions.
+ */
+#  if !defined(OPENSSL_USE_IPV6)
+#    if defined(AF_INET6) && !defined(OPENSSL_SYS_BEOS_BONE) && !defined(NETWARE_CLIB)
+#      define OPENSSL_USE_IPV6 1
+#    else
+#      define OPENSSL_USE_IPV6 0
+#    endif
+#  endif
+
 #endif
 
 #if defined(__ultrix)