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: in LookupHost, DNS resolves addresses with dot using search domain without it being specified in resolv.conf #31934
Comments
Can you try Go 1.12 too? But I'm not sure how to repro this myself. In your dig example, did you mean qubebot or bot? Previously: #16739 but that looks old (Go 1.7-ish). |
I kubectl exec'ed into a pod in a Kubernetes cluster and can't reproduce. Looks fine to me:
|
qubebot was just name of app I've encountered it in, name doesn't matter as long as
Sure, debian package:
and from webpage:
in all cases tested for Also, it only happens for LookupHost, LookupAddr is ok:
I have updated the title to straighten that up |
Show the output of running with environment Also, what is your /etc/hosts and /etc/nsswitch.conf and /etc/resolv.conf? |
tested with empty nsswitch (empty kubernetes container with static Go binary) and with
did you ran my examples ? what do they return on your machine ? |
Ok, I think I found the problem: System resolver asks for Go asks for the difference is that system resolver only adds search domain if domain does not contain a dot. the
so default only uses search domains if there is no dot in name, while Go disregards that and queries search domains regardless of what is in the name And the reason it happens on my setup is because one of my predecessors added CNAME Here is a pcap with the problem:
|
Indicates that this is the system resolver. The
It would appear that there is no bug, only a misconfigured environment. |
Version: go version go1.11.6 linux/amd64, tested also on 1.10
Issue: *.local addresses are not sent to resolver set by
/etc/resolv.conf
Background: Kuberneres clusters use
cluster.local
as default domain for their internal DNS service. So test code:resolv.conf:
request using system resolver:
The text was updated successfully, but these errors were encountered: