From: Ian Lance Taylor Date: Fri, 1 Jul 2022 05:06:26 +0000 (-0700) Subject: net: ignore edns0 option in resolv.conf X-Git-Tag: go1.20rc1~1646 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7acbbbee947626d9d411f8b3398400413d0fd0ce;p=gostls13.git 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 Auto-Submit: Ian Lance Taylor TryBot-Result: Gopher Robot Run-TryBot: Ian Lance Taylor Run-TryBot: Ian Lance Taylor Reviewed-by: Damien Neil --- diff --git a/src/net/dnsconfig_unix.go b/src/net/dnsconfig_unix.go index 94cd09ec71..3ba6d44fc3 100644 --- a/src/net/dnsconfig_unix.go +++ b/src/net/dnsconfig_unix.go @@ -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 }