Skip to content

Commit 7acbbbe

Browse files
ianlancetaylorgopherbot
authored andcommitted
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 <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Damien Neil <[email protected]>
1 parent 59865f1 commit 7acbbbe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/net/dnsconfig_unix.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ func dnsReadConfig(filename string) *dnsConfig {
109109
// https://www.freebsd.org/cgi/man.cgi?query=resolv.conf&sektion=5&manpath=freebsd-release-ports
110110
// https://man.openbsd.org/resolv.conf.5
111111
conf.useTCP = true
112+
case s == "edns0":
113+
// We use EDNS by default.
114+
// Ignore this option.
112115
default:
113116
conf.unknownOpt = true
114117
}

0 commit comments

Comments
 (0)