You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a Resolver, override its Dial function to set a fixed resolver ip to be used: 1.2.3.4:53.
Use it to resolve cloudflare.com.
Notice that the error message has the wrong resolver ip after lookup cloudflare.com on
lookup cloudflare.com on 1.2.3.4:53: dial udp 1.2.3.4:53: connect: no route to host
What did you see instead?
lookup cloudflare.com on 169.254.169.254:53: dial udp 1.2.3.4:53: connect: no route to host
I have tracked the issue down to tryOneName not being aware Dial has been overridden.
Therefore, in its error message it is using the server it got from the lookup function that gets a list of servers from resolv.conf .
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Create a
Resolver
, override itsDial
function to set a fixed resolver ip to be used:1.2.3.4:53
.Use it to resolve
cloudflare.com
.Notice that the error message has the wrong resolver ip after
lookup cloudflare.com on
Minimal reproducer: https://go.dev/play/p/4Se0BI1xwJx
What did you expect to see?
What did you see instead?
I have tracked the issue down to
tryOneName
not being awareDial
has been overridden.Therefore, in its error message it is using the
server
it got from thelookup
function that gets a list of servers fromresolv.conf
.The text was updated successfully, but these errors were encountered: