-
Notifications
You must be signed in to change notification settings - Fork 18k
net: silently ignore trust-ad option in /etc/resolv.conf and not to fallback to the cgo resolver #51152
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
Comments
This would make sense, Go doesn't have the ability to do DNSSEC validation, so there isn't any alternative to trusting the AD bit. There is one difference in behavior for glibc with this option though: If it's set, glibc sets the AD bit in queries, otherwise it doesn't. Some DNS recursors might be configured to only do DNSSEC validation if the AD (or DO) bit is set, and otherwise return everything even if it's bogus. (see PowerDNS docs: dnssec=process) |
Didn't know about that behavior, but it might make sense to follow the glibc implementation, and add the AD flag to queries when |
Thanks for including that link to the PowerDNS docs. It is even the default behavior of PowerDNS since 4.5.0. |
Change https://go.dev/cl/408654 mentions this issue: |
For golang/go#51152 Change-Id: I1e348afaa1533849e682194efb1c404f9e678e56 GitHub-Last-Rev: c5ef8a5 GitHub-Pull-Request: #136 Reviewed-on: https://go-review.googlesource.com/c/net/+/408654 Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Change https://go.dev/cl/428955 mentions this issue: |
For golang/go#51152 Change-Id: I1e348afaa1533849e682194efb1c404f9e678e56 GitHub-Last-Rev: c5ef8a56ad1d85645c95f25e719a476595063471 GitHub-Pull-Request: golang/net#136 Reviewed-on: https://go-review.googlesource.com/c/net/+/408654 Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Change https://go.dev/cl/451420 mentions this issue: |
For #50101 For #51152 For #53482 For #55301 For #56515 Change-Id: I11edeb4be0a7f80fb72fd7680a3407d081f83b8b Reviewed-on: https://go-review.googlesource.com/c/go/+/451420 TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Damien Neil <dneil@google.com> Run-TryBot: Damien Neil <dneil@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
The
/etc/resolv.conf
file often includes:options edns0 trust-ad
. Golang does not recognize either of those options, so it fallbacks to the cgo reoslver.I think that
trust-ad
should be silently ignored. Golang does not use the ad flag anywhere, so it should be safe to silently ignore that option and not cause fallback to the cgo resolver.Edit: edns0 option
The text was updated successfully, but these errors were encountered: