mirror of
https://github.com/golang/go
synced 2024-11-23 05:00:07 -07:00
net: ignore edns0 option in resolv.conf
We use EDNS(0) by default. No need to fall back to netdns=cgo if we see a explicit request for EDNS(0) in resolv.conf. For #51153 Change-Id: I135363112e3de43ce877aad45aba71d1448068b7 Reviewed-on: https://go-review.googlesource.com/c/go/+/415579 Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Damien Neil <dneil@google.com>
This commit is contained in:
parent
59865f1420
commit
7acbbbee94
@ -109,6 +109,9 @@ func dnsReadConfig(filename string) *dnsConfig {
|
||||
// https://www.freebsd.org/cgi/man.cgi?query=resolv.conf&sektion=5&manpath=freebsd-release-ports
|
||||
// https://man.openbsd.org/resolv.conf.5
|
||||
conf.useTCP = true
|
||||
case s == "edns0":
|
||||
// We use EDNS by default.
|
||||
// Ignore this option.
|
||||
default:
|
||||
conf.unknownOpt = true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user