-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
net: Issue with LookupAddr for "0.0.0.0" on Windows in 1.14 #37657
Comments
/cc @mikioh |
cc @ianlancetaylor @alexbrainman Note, mikioh has not responded to cc's for about a year, last I checked. |
@prashantthakre I just built your program with go1.14, and run it on my Windows 10 computer. And it prints
What am I doing wrong? Thank you. Alex |
It shouldn't be printing that, if condition should never be satisfied. Please try the same with go1.13.x.
Seems to be a regression compared to go1.13.x |
Yes, I misread your original issue. I bisected this issue to cb325fe But why do you think 0.0.0.0 should not resolve. For example, try running Resolve-DnsName -Name 0.0.0.0 -Type PTR | FL in Powershell. It prints
here. I reviewed https://go-review.googlesource.com/c/go/+/178701 But, I am not network expert, maybe I am wrong? Thank you. /cc @tdabasinskas Alex |
Not saying that it should not resolve, far from being an expert on networking standards.
Not available on Windows 7, instead tried
#29600 (comment) mentions use of nslookup for verifying 192. ip series, not sure if we should do the same for 0.0.0.0
Thanks, |
nameinfo.txt Windows: C:\workspace\cxx>zero0zero0.exe 8.8.8.8 |
Fair enough. Leaving for others to decide what to do here. Alex |
@prashantthakre is there a different way to do what you need, since MacOS and Windows differ on the meaning of 0.0.0.0? |
I have already added a check for IsUnspecified() and bypassing LookupAddr(). Regards, |
This appears to be working as intended |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, and differs in behaviour with go version go1.13.8 windows/amd64
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/oroonTx_Px2
What did you expect to see?
No reverse lookup possible
What did you see instead?
Host: WIN-DESKTOP
The text was updated successfully, but these errors were encountered: