[openssl/openssl] bio_dgram vs IPv6

Matt Caswell matt at openssl.org
Tue Mar 22 16:31:02 UTC 2022



On 22/03/2022 16:22, Michael Richardson wrote:
> 
> Michael Wojcik <Michael.Wojcik at microfocus.com> wrote:
>      > The RFC specifically mentions using this API to retrieve and set
>      > addresses, so it seems like a fix for issue 5257 does need to use it,
>      > if that's to be done in a portable way.
> 
>      > 3542 is only Informational, but I'd expect most or all platforms with
>      > IPv6 support to conform to it.
> 
> The issue isn't whether we can expect it to be standard.
> The issue is what we can use as a signal that the header exists.
> To date, I don't think that openssl has had to know if IPv6 existed or not on
> a particular platform.


internal/sockets.h has this snippet in it:

/*
  * Some IPv6 implementations are broken, you can disable them in known
  * bad versions.
  */
# if !defined(OPENSSL_USE_IPV6)
#  if defined(AF_INET6)
#   define OPENSSL_USE_IPV6 1
#  else
#   define OPENSSL_USE_IPV6 0
#  endif
# endif


There is already code in bss_dgram.c that is conditionally compiled on 
OPENSSL_USE_IPV6. Is it reasonable to assume that if AF_INET6 is defined 
then ip6.h exists?

Matt


More information about the openssl-users mailing list