Repository navigation
fix(shared): port checks no longer fail on hosts with IPv6 disabled - #15044
Merged
juliusmarminge merged 5 commits intoOct 19, 2026
Merged
Conversation
On a kernel booted with `ipv6.disable=1`, binding `::` or `::1` fails with EAFNOSUPPORT. canListenOnHost only treated EADDRNOTAVAIL as "available", so every port looked taken: the desktop app scanned 3773-65535 and quit with DesktopBackendPortUnavailableError. Fixes pingdotgg#15038 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped shared-network bug fix that handles IPv6-disabled hosts without changing occupied-port detection or APIs. Focused regression coverage is included for both relevant error codes. You can add or adjust custom eligibility rules. Learn more. |
macroscopeapp
Bot
dismissed
their stale review
October 3, 2026 05:21
Dismissing prior approval to re-evaluate 935a294
Member
|
Taking over this one. I'll merge main into the branch, trim the tests to the minimum, keep the fix, run adversarial reviews, and push here. Thanks @mr-joom for the root cause. |
macroscopeapp
Bot
dismissed
their stale review
October 19, 2026 02:40
Dismissing prior approval to re-evaluate 86394f1
Closed
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hosts booted without IPv6 support return
EAFNOSUPPORTwhen a port probe opens an IPv6 socket. The shared network helper treated that as an occupied port, so desktop startup could reject every otherwise free port.The helper now treats
EAFNOSUPPORTlike the existingEADDRNOTAVAILcase. IPv4 is still checked, and an occupied IPv4 port remains unavailable. Contributor commits from @mr-joom's #15044 are preserved; main was merged to resolve the conflict.Verification:
EAFNOSUPPORTfromsocket(AF_INET6, ...). Main reported a free IPv4 port unavailable and discarded the preferred port; the fix reported it available and kept the preferred port. Both versions rejected an occupied IPv4 port. Syscall tracing confirmed the errno.EADDRNOTAVAILpath; free and occupied IPv4 behavior stayed correct.Before/after syscall and port-selection output.
These process-local checks do not change host networking. They reproduce the errno without rebooting into an IPv6-disabled kernel. A machine actually booted with
ipv6.disable=1, macOS, Windows, iOS, Android, and Electron desktop were not tested. This is nonvisual port-selection behavior; syscall output and focused tests are the evidence.Implementation: GPT-6.1 Sol through the Codex harness in T3 Code; tests: GPT-6 Astra; adversarial review: Claude Opus 5.5 and GPT-6 Sol.