Skip to content

Cherry pick PR #8367: starboard: Cherry pick PR #8053: Fix DNS lookups for IPv6 addresses. - #8428

Merged
jellefoks merged 1 commit into
26.eapfrom
cherry-pick-26.eap-8367
Dec 16, 2025
Merged

jellefoks merged 1 commit into
26.eapfrom
cherry-pick-26.eap-8367

Conversation

@cobalt-github-releaser-bot

Copy link
Copy Markdown
Collaborator

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

…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)
@github-actions

Copy link
Copy Markdown
Contributor

🤖 Gemini Suggested Commit Message


starboard: Fix DNS lookups for IPv6 addresses

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. This
resolves 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

💡 Pro Tips for a Better Commit Message:

  1. Influence the Result: Want to change the output? You can write custom prompts or instructions directly in the Pull Request description. The model uses that text to generate the message.
  2. Re-run the Generator: Post a comment with: /generate-commit-message

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jellefoks
jellefoks merged commit a56b52e into 26.eap Dec 16, 2025
376 checks passed
@jellefoks
jellefoks deleted the cherry-pick-26.eap-8367 branch December 16, 2025 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants