apps: Use the first detected address family if IPv6 is not available [1.1.1]#16078
Closed
ueno wants to merge 1 commit intoopenssl:OpenSSL_1_1_1-stablefrom
Closed
apps: Use the first detected address family if IPv6 is not available [1.1.1]#16078ueno wants to merge 1 commit intoopenssl:OpenSSL_1_1_1-stablefrom
ueno wants to merge 1 commit intoopenssl:OpenSSL_1_1_1-stablefrom
Conversation
This is a follow up of 15729be. Even when the host does not support IPv6 at all, BIO_lookup_ex may now return IN6ADDR_ANY in addition to INADDR_ANY, as the second element of the ai_next field. After eee8a40, the do_server function prefers the IPv6 address and fails on the BIO_socket call. This adds a fallback code to retry with the IPv4 address returned as the first element to avoid the error. The failure had been partially avoided in the previous code with AI_ADDRCONFIG, because getaddrinfo returns only IPv4 address if no IPv6 address is associated with external interface. However, it would be still a problem if the external interface has an IPv6 address assigned, while the loopback interface doesn't. Signed-off-by: Daiki Ueno <[email protected]>
t8m
approved these changes
Jul 14, 2021
paulidale
approved these changes
Jul 15, 2021
Collaborator
|
This pull request is ready to merge |
openssl-machine
pushed a commit
that referenced
this pull request
Jul 16, 2021
This is a follow up of 15729be. Even when the host does not support IPv6 at all, BIO_lookup_ex may now return IN6ADDR_ANY in addition to INADDR_ANY, as the second element of the ai_next field. After eee8a40, the do_server function prefers the IPv6 address and fails on the BIO_socket call. This adds a fallback code to retry with the IPv4 address returned as the first element to avoid the error. The failure had been partially avoided in the previous code with AI_ADDRCONFIG, because getaddrinfo returns only IPv4 address if no IPv6 address is associated with external interface. However, it would be still a problem if the external interface has an IPv6 address assigned, while the loopback interface doesn't. Signed-off-by: Daiki Ueno <[email protected]> Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #16078)
Member
|
Merged to 1.1.1 branch. Thank you for the contribution. |
dstebila
added a commit
to open-quantum-safe/openssl
that referenced
this pull request
Aug 26, 2021
Backport of #16074 to the 1.1.1 branch.