Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Windows, primary nameserver (127.0.0.1) is sorted after secondary nameserver #461

Open
spazmodius opened this issue Apr 11, 2022 · 1 comment

Comments

@spazmodius
Copy link

spazmodius commented Apr 11, 2022

Environment

Windows 10
c-ares 1.18.1 (I think, as included in Node.js v16.14.0)

Setup

My Primary DNS server configures for 127.0.0.1, a local instance of SmartDns. My secondary DNS server is my ISP's.

image

Problem

ares_get_servers_ports sorts my nameservers in reverse of preference, and uses my ISP's server for resolution instead of my local server.

Why

GetBestRoute2 for 127.0.0.1 on my wifi interface returns ERROR_INVALID_PARAMETER, thus that server gets assigned the worst possible metric.


First reported to nodejs

@nanonyme
Copy link

Usually when I see this kind of local DNS setups, there is nothing else configured in DNS except the local IP. So alternative address would be 0.0.0.0.

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

No branches or pull requests

2 participants