net: dns lookup should retry on TCP for truncated response #5686
Labels
Milestone
Comments
Comment 1 by julius@soundcloud.com: Correction: several other net.Lookup*() functions (net.LookupIP(), net.LookupMX(), etc.) seem to all use lookup() in the backend as well, so they should also be affected by this problem. |
Comment 3 by julius@soundcloud.com: I am simply building Go from source via src/all.bash. How do I enable using the cgo versions of those functions? I don't think they're using cgo right now, since local changes I made to the Go version of lookup() took effect after rebuilding. Right now my go version is the latest tip: go version devel +ae79f385177d Wed Jun 12 14:05:13 2013 +1000 linux/amd64 |
Comment 5 by julius@soundcloud.com: go env reports: $ go env GOARCH="amd64" GOBIN="" GOCHAR="6" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/julius/go:/home/julius/gosrc" GORACE="" GOROOT="/home/julius/go" GOTOOLDIR="/home/julius/go/pkg/tool/linux_amd64" CC="gcc" GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread" CGO_ENABLED="1" $ which go /home/julius/go/bin/go $ ls -l /home/julius/go/bin/go -rwxrwxr-x 1 julius julius 8096584 Jun 12 13:49 /home/julius/go/bin/go So this is the version I just built. I added a panic() just before the Dial("udp", ...) in net.tryOneName() and sure enough, it panics when I do LookupSRV(). Maybe there is no CGO version of this functionality yet? |
Comment 8 by fish@soundcloud.com: Seems like it's not supported: http://sourceware.org/bugzilla/show_bug.cgi?id=2099 |
Comment 10 by fish@soundcloud.com: Considered including https://github.com/miekg/dns in the core? Might be too heavy, but it's a great, idiomatic library in a similar style to net/http. |
This issue was closed by revision 0a3cb7e. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by julius@soundcloud.com:
The text was updated successfully, but these errors were encountered: