net: fallback to IPv6-only when dual-stack bind fails - #65669
Open
suii2210 wants to merge 1 commit into
Open
Conversation
Collaborator
|
Review requested:
|
suii2210
force-pushed
the
fix-ipv6-only-bind
branch
3 times, most recently
from
August 30, 2026 17:09
434e58f to
feaf676
Compare
Contributor
|
Please make sure you have read and understood the following documents:
The advice in the above documents says that you may use the Slack channel if your PR is not getting attention. That means you should be patient and wait. Posting to Slack 20 minutes after opening your PR is too fast by a long way. |
Signed-off-by: suii2210 <work8758@gmail.com>
suii2210
force-pushed
the
fix-ipv6-only-bind
branch
from
August 30, 2026 17:25
feaf676 to
4d6af84
Compare
Author
I’m really sorry for the inconvenience 🥺. I’ll be more patient from now on and will make sure I don’t repeat this mistake again. |
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.
Summary
When IPv4 is unavailable, Node.js may fail while creating the default IPv6 dual-stack listening socket. Setting
IPV6_V6ONLY=0can returnEAFNOSUPPORT, after which the existing code falls back to IPv4, which is also unavailable.This change retries the IPv6 bind with
UV_TCP_IPV6ONLYenabled before falling back to IPv4.Tests
test/sequential/test-net-server-listen-ipv6-only-system.jstools/test.py test/sequential/test-net-server-listen-ipv6-only-system.jsmake lintRefs: #65400