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

proposal: net: new LookupCNAME() functions to list chained CNAME records #29039

Open
therealjoesmith opened this Issue Nov 30, 2018 · 4 comments

Comments

Projects
None yet
4 participants
@therealjoesmith

therealjoesmith commented Nov 30, 2018

What version of Go are you using (go version)?

$ go version
go version go1.11.1 linux/amd64

Does this issue reproduce with the latest release?

Yes.

What did you do?

https://play.golang.org/p/HTHVSd81SPJ

What did you expect to see?

I wanted to see the chain of CNAME records for www.microsoft.com.

What did you see instead?

Go returns only the last record. That's correct (it is the canonical name after all), but there are situations where it's interesting to probe the chain. On the command line, try:

$ host www.microsoft.com
www.microsoft.com is an alias for www.microsoft.com-c-3.edgekey.net.
www.microsoft.com-c-3.edgekey.net is an alias for www.microsoft.com-c-3.edgekey.net.globalredir.akadns.net.
www.microsoft.com-c-3.edgekey.net.globalredir.akadns.net is an alias for e13678.dspb.akamaiedge.net.
e13678.dspb.akamaiedge.net has address 23.211.9.92
e13678.dspb.akamaiedge.net has IPv6 address 2a02:26f0:d3:484::356e
e13678.dspb.akamaiedge.net has IPv6 address 2a02:26f0:d3:48c::356e

I'd like functions that return a []string of the intermediaries instead of just the final CNAME.

@gopherbot gopherbot added this to the Proposal milestone Nov 30, 2018

@gopherbot gopherbot added the Proposal label Nov 30, 2018

@agnivade agnivade changed the title from Proposal: New LookupCNAME() functions to list chained CNAME records to proposal: net: new LookupCNAME() functions to list chained CNAME records Nov 30, 2018

@ianlancetaylor

This comment has been minimized.

Contributor

ianlancetaylor commented Nov 30, 2018

This may be more appropriate for golang.org/x/net/dns, or similar, rather than the standard library.

@andybons

This comment has been minimized.

Member

andybons commented Dec 5, 2018

@therealjoesmith how do you feel about @ianlancetaylor’s suggestion to have this in /x/net/dns?

@therealjoesmith

This comment has been minimized.

therealjoesmith commented Dec 5, 2018

I don't have any convincing argument either way. I appreciate the standard library is already complicated as it is. I'll leave it to more informed contributors to make that decision.

@ianlancetaylor

This comment has been minimized.

Contributor

ianlancetaylor commented Dec 5, 2018

Is there any reason that the new functionality could not go in x/net/dns?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment