Fix windows DNS server resolution#62938
Conversation
|
Review requested:
|
|
Good job |
|
Its definitly going to help me bypass this annoying issue. Would love to see it merged |
|
@anonrig could you help review this PR please if you have the chance? |
|
could you help review as well please? @mcollina @pimterry @trivikr @Ethan-Arrowood @RafaelGSS @lpinca @cjihrig @richardlau @juanarbol @marco-ippolito |
Please add a test. |
|
Also this change needs to be upstreamed. You're updating deps/cares folder which will get overwritten whenever we update cares. |
Hey @anonrig , thanks for the direction on this! It seems like it was already fixed on c-ares end 2 weeks ago, asked them here if there any soon plans to release, once it's released, I believe nodejs bot would raise a PR updating the lib shortly after. I believe this PR won't be needed in this case, closing it for now. Thanks for everything! |
Summary
This PR addresses a Windows DNS regression observed after the c-ares update in the following nodejs versions:
Where I first realized when trying to connect to MongoDB atlas through VPN in Windows failed.
['127.0.0.1']['::ffff:127.0.2.2', '::ffff:127.0.2.3', '127.0.2.2', '127.0.2.3']fallback to loopback-only resolver configuration
get_DNS_Windows()(e.g.GetNetworkParams,ordering) as needed for this setup
I believe it was regressed after the c-ares update to v1.34.6:
Testing
Windows validation performed with:
Observed results:
dns.getServers()now returns:['::ffff:127.0.2.2', '::ffff:127.0.2.3', '127.0.2.2', '127.0.2.3']just like was before the regressionmongodb+srv://It could also be tested with switching between 24.12 to 24.13 and observing the DNS servers.
Notes
Ideally, the fix would be backdated for all the affected versions (v20, v22, v24, v25)
Thank you for your time and consideration on looking into this 🙏.