-
Notifications
You must be signed in to change notification settings - Fork 18k
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: TestLookupCNAME fails #1745
Labels
Comments
How about this C program? #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #define nil ((void*)0) int main(int argc, char **argv) { int g; struct addrinfo *res, hints; memset(&hints, 0, sizeof hints); hints.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ALL; g = getaddrinfo("www.google.com", nil, &hints, &res); if(g != 0) { fprintf(stderr, "%s\n", gai_strerror(g)); exit(2); } for(; res; res=res->ai_next) { printf("%d %d %d %d %s\n", res->ai_family, res->ai_socktype, res->ai_protocol, res->ai_addrlen, res->ai_canonname); } exit(0); } Owner changed to @rsc. Status changed to Accepted. |
This is one of the many reasons we omit that test during gotest -short (and all.bash). The IP address that your host output returned is not actually a Google server: $ host 67.142.161.38 38.161.142.67.in-addr.arpa domain name pointer host671420038161.direcway.com. $ Your ISP (or its ISP, or ...) is intercepting the lookup for www.google.com and providing false records, probably because it wants to intercept your search traffic. Go is just returning what the (false) DNS records say, and they are wrong, so the test fails. One possible workaround is to use the Google public DNS servers 8.8.8.8 and 8.8.4.4 instead of the ones suggested by your ISP. http://code.google.com/speed/public-dns/ Status changed to Invalid. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: