Skip to content

Refactor dns.lookup and address handling logic#7

Open
C0oki3s wants to merge 1 commit into
C0oki3s-patch-1from
C0oki3s-patch-2
Open

Refactor dns.lookup and address handling logic#7
C0oki3s wants to merge 1 commit into
C0oki3s-patch-1from
C0oki3s-patch-2

Conversation

@C0oki3s
Copy link
Copy Markdown
Owner

@C0oki3s C0oki3s commented Oct 22, 2025

Updated dns.lookup to return all addresses and adjusted bitwise operations for consistency.

Updated dns.lookup to return all addresses and adjusted bitwise operations for consistency.
Copilot AI review requested due to automatic review settings October 22, 2025 11:48
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the DNS resolution fallback mechanism to retrieve all addresses instead of a single address, and fixes bitwise operations to ensure proper unsigned 32-bit integer handling. The changes improve the reliability of address resolution and prevent potential signed integer issues in IPv4 address normalization.

Key changes:

  • Modified dns.lookup to return all addresses (all: true) instead of a single address
  • Updated address handling logic to iterate through multiple addresses
  • Added unsigned right shift (>>> 0) to bitwise operations to ensure proper 32-bit unsigned integer conversion

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@C0oki3s C0oki3s self-assigned this Oct 22, 2025
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