Repository navigation
Cherry pick PR #8367: starboard: Cherry pick PR #8053: Fix DNS lookups for IPv6 addresses. - #8428
Conversation
…8367) Refer to the original PR: #8053 The Starboard layer wrapper for getaddrinfo() made incorrect copies of the sockaddr structure for IPv6 addresses. This issue prevented proper resolution and use of IPv6 addresses for DNS lookups. This change modifies the wrapper to ensure that the entire sockaddr structure, including the address data, is correctly copied, thus resolving the IPv6 address lookup failures. Additionally, extensive tests have been added and updated to thoroughly verify both IPv4 and IPv6 address resolution for known external hosts and localhost. Bug: 460175900 Bug: 438858995 Bug: 409716671 Bug: 460594994 Bug: 439002238 Bug: 405988446 Co-authored-by: jimmy.ge <[email protected]> (cherry picked from commit 2280057)
🤖 Gemini Suggested Commit Message💡 Pro Tips for a Better Commit Message:
|
There was a problem hiding this comment.
Code Review
This pull request is a cherry-pick intended to fix an issue with DNS lookups for IPv6 addresses. The changes involve correcting the way sockaddr structures are copied within the getaddrinfo wrapper and adding comprehensive tests to validate both IPv4 and IPv6 address resolution.
In accordance with the repository's style guide, which advises focusing on the correct application of patches for cherry-picks rather than detailed style reviews, I have concentrated on the correctness of the fix. The modification in starboard_layer_posix_socket_abi_wrappers.cc correctly resolves the bug by ensuring the entire sockaddr structure is copied, preventing the truncation of IPv6 addresses. The updated tests in posix_socket_resolve_test.cc are robust and provide excellent coverage for this change. The implementation appears correct and well-executed, and I have not identified any issues.
Refer to the original PR: #8367
Refer to the original PR: #8053
The Starboard layer wrapper for getaddrinfo() made incorrect copies of
the sockaddr structure for IPv6 addresses. This issue prevented proper
resolution and use of IPv6 addresses for DNS lookups.
This change modifies the wrapper to ensure that the entire sockaddr
structure, including the address data, is correctly copied, thus
resolving the IPv6 address lookup failures. Additionally, extensive
tests have been added and updated to thoroughly verify both IPv4 and
IPv6 address resolution for known external hosts and localhost.
Bug: 460175900
Bug: 438858995
Bug: 409716671
Bug: 460594994
Bug: 439002238
Bug: 405988446