From 7acbbbee947626d9d411f8b3398400413d0fd0ce Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 30 Jun 2022 22:06:26 -0700 Subject: [PATCH] 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 --- src/net/dnsconfig_unix.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/net/dnsconfig_unix.go b/src/net/dnsconfig_unix.go index 94cd09ec710..3ba6d44fc3a 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 }