Repository navigation
starboard: Cherry pick PR #8053: Fix DNS lookups for IPv6 addresses. - #8367
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Code Review
This pull request is a cherry-pick of an upstream change to fix DNS lookups for IPv6 addresses. The core fix in starboard/shared/modular/starboard_layer_posix_socket_abi_wrappers.cc correctly addresses an issue with copying sockaddr structures for IPv6 by ensuring the entire structure is copied. This is accompanied by robust test enhancements in starboard/nplb/posix_compliance/posix_socket_resolve_test.cc to validate the fix for both IPv4 and IPv6. The pull request also includes a significant refactoring, moving responsibilities from cobalt/browser to cobalt/shell and improving Android connectivity detection logic. In accordance with the repository's style guide for cherry-picks, this review focused on the correct application of the patch. The changes are extensive but appear to be self-consistent and correctly integrated.
The Starboard layer wrapper for getaddrinfo() made incorrect copies of the address returned for IPv6 addresses. This fixes that and adds extensive testing using a host with known IP addresses. The fix is adopted from youtube#7588 with a simplification and additional tests. This PR also includes an update to test certs for net_unittests that expired Oct 29 2025. Bug: 460175900 Bug: 438858995 Bug: 409716671 Bug: 460594994 Bug: 439002238 Bug: 405988446 --------- Co-authored-by: jimmy.ge <[email protected]>
9e3163f to
e25bc15
Compare
yell0wd0g
left a comment
There was a problem hiding this comment.
Whoops didn't see my +1 was needed. Doing it now
…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)
…s for IPv6 addresses. (#8428) 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 Co-authored-by: Jelle Foks <[email protected]> Co-authored-by: jimmy.ge <[email protected]>
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