Skip to content

net: rework the CNAME handling on unix #57093

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mateusz834
Copy link
Member

@mateusz834 mateusz834 commented Dec 5, 2022

This change reworks the LookupCNAME handling:

  1. It removes the fallback to the go resolver
    when cgoLookupCNAME faills (even noSuchHosts), this
    also implies using the canonical name from getaddrinfo.
  2. Improves the error handling of the res_search cgo routines, so
    returning proper &DNSError to match the go resolver behaviour and
    detecting the noSuchHost condition.
  3. Makes the LookupCNAME return the last CNAME in the chain,
    not the first one.

More details about current issues are described in #59943.

Fixes #59943
Updates #50101

@gopherbot
Copy link
Contributor

This PR (HEAD: d53187d) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/455275 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: c73cb25) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/455275 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: 4f7f78d) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/455275 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: a431ad1) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/455275 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: f6b504c) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/455275 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: 445464f) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/455275 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: 4b78ce8) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/455275 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: 32f3d80) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/455275 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Damien Neil:

Patch Set 9: Run-TryBot+1

(11 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 9:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 9:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 9: TryBot-Result-1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 4a0bf94) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/455275 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 9:

(6 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 10:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: a62373d) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/455275 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: 3c7399a) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/455275 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 11:

(3 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 106b173) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/455275 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: 1ab00b0) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/455275 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: 12a97e0) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/455275 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: 2f47ddd) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/455275 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@mateusz834 mateusz834 force-pushed the net-linux-return-last-CNAME-in-chain branch from 2f47ddd to 71b99f1 Compare May 3, 2023 08:42
@gopherbot
Copy link
Contributor

This PR (HEAD: 71b99f1) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/455275 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: 579098c) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/455275 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from [email protected]:

Patch Set 18:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from [email protected]:

Patch Set 19:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 19: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 19:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 19:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@mateusz834 mateusz834 force-pushed the net-linux-return-last-CNAME-in-chain branch from effb49f to b3c5526 Compare July 19, 2023 18:14
@gopherbot
Copy link
Contributor

This PR (HEAD: b3c5526) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/455275.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to register for Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 69: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 69:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 69: TryBot-Result+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@mateusz834 mateusz834 force-pushed the net-linux-return-last-CNAME-in-chain branch from b3c5526 to af47818 Compare August 22, 2023 06:41
@gopherbot
Copy link
Contributor

This PR (HEAD: af47818) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/455275.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to register for Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@mateusz834 mateusz834 force-pushed the net-linux-return-last-CNAME-in-chain branch from af47818 to 624c0e1 Compare August 22, 2023 06:46
@gopherbot
Copy link
Contributor

This PR (HEAD: 624c0e1) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/455275.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to register for Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 71: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 71:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 71: TryBot-Result-1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@mateusz834 mateusz834 force-pushed the net-linux-return-last-CNAME-in-chain branch from 624c0e1 to b563c03 Compare August 27, 2023 08:27
@gopherbot
Copy link
Contributor

This PR (HEAD: b563c03) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/455275.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to register for Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 72: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 72:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 72: TryBot-Result+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@mateusz834 mateusz834 force-pushed the net-linux-return-last-CNAME-in-chain branch from b563c03 to b7ff797 Compare September 18, 2023 17:39
@gopherbot
Copy link
Contributor

This PR (HEAD: b7ff797) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/455275.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to register for Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 73: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 73:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 73: TryBot-Result+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@mateusz834 mateusz834 force-pushed the net-linux-return-last-CNAME-in-chain branch from b7ff797 to 41bc1ff Compare October 3, 2023 17:08
@gopherbot
Copy link
Contributor

This PR (HEAD: 41bc1ff) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/455275.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to register for Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 74: Run-TryBot+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 74:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Ian Lance Taylor:

Patch Set 74:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 74: TryBot-Result+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mateusz Poliwczak:

Patch Set 74:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/455275.
After addressing review feedback, remember to publish your drafts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

net: LookupCNAME inconsistency on unix systems
2 participants