net: fallback to IPv6-only when dual-stack bind fails - #65669
Conversation
|
Review requested:
|
434e58f to
feaf676
Compare
|
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>
feaf676 to
4d6af84
Compare
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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65669 +/- ##
==========================================
- Coverage 90.13% 90.04% -0.10%
==========================================
Files 751 754 +3
Lines 253639 255761 +2122
Branches 47790 48328 +538
==========================================
+ Hits 228618 230293 +1675
- Misses 16264 16590 +326
- Partials 8757 8878 +121
🚀 New features to boost your workflow:
|
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