Skip to content

fix(apple): use all found system resolvers - #9991

Merged
thomaseizinger merged 3 commits into
mainfrom
fix/apple-use-all-dns-resolvers
Jul 24, 2025
Merged

fix(apple): use all found system resolvers#9991
thomaseizinger merged 3 commits into
mainfrom
fix/apple-use-all-dns-resolvers

Conversation

@jamilbk

@jamilbk jamilbk commented Jul 24, 2025

Copy link
Copy Markdown
Member

When validating the found system resolvers on macOS and iOS, we would stop after validating the first found resolver (usually IPv4) because break was used instead of continue.

Fixes #9914

@vercel

vercel Bot commented Jul 24, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
firezone ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 24, 2025 8:59pm

Copilot AI 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.

Pull Request Overview

This PR fixes a bug in the system resolver validation logic for macOS and iOS where only the first found resolver was being processed instead of all available resolvers. The fix changes loop control flow to continue processing all resolvers rather than breaking after the first one.

  • Replaces break statements with continue statements in resolver parsing loop
  • Ensures all system resolvers (both IPv4 and IPv6) are validated and added to the parsed resolvers list

Comment on lines +466 to +471
continue
}

if let ipv6Address = IPv6Address(stringAddress) {
parsedResolvers.append("\(ipv6Address)")
break
continue

Copilot AI Jul 24, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] The continue statement here is correct for processing all resolvers, but it's unnecessary since the code would naturally continue to the next iteration anyway. Consider removing this continue statement for cleaner code flow.

Copilot uses AI. Check for mistakes.
Comment on lines +466 to +471
continue
}

if let ipv6Address = IPv6Address(stringAddress) {
parsedResolvers.append("\(ipv6Address)")
break
continue

Copilot AI Jul 24, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] The continue statement here is correct for processing all resolvers, but it's unnecessary since the code would naturally continue to the next iteration anyway. Consider removing this continue statement for cleaner code flow.

Copilot uses AI. Check for mistakes.
@jamilbk
jamilbk added this pull request to the merge queue Jul 24, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Jul 24, 2025
Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
@thomaseizinger
thomaseizinger enabled auto-merge July 24, 2025 20:57
@thomaseizinger
thomaseizinger added this pull request to the merge queue Jul 24, 2025
Merged via the queue into main with commit e9a863d Jul 24, 2025
28 checks passed
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.

macOS IPv6 system resolvers don't seem to be read

3 participants