]> Cypherpunks repositories - gostls13.git/commitdiff
net: ignore edns0 option in resolv.conf
authorIan Lance Taylor <iant@golang.org>
Fri, 1 Jul 2022 05:06:26 +0000 (22:06 -0700)
committerGopher Robot <gobot@golang.org>
Sun, 14 Aug 2022 00:13:15 +0000 (00:13 +0000)
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>
src/net/dnsconfig_unix.go

index 94cd09ec71066f0f4fd329cb5a0fb7436d15df04..3ba6d44fc3a9c9e477c27dce0e6b83ed2725355f 100644 (file)
@@ -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
                                }