From e25ab757952872d65f3b12bcf261a6284c98db9f Mon Sep 17 00:00:00 2001 From: Anton Tolchanov Date: Sun, 30 Oct 2022 08:35:46 +0000 Subject: [PATCH] net/dns: getting base DNS config is not supported on macOS Instead of returning a custom error, use ErrGetBaseConfigNotSupported that seems to be intended for this use case. This fixes DNS resolution on macOS clients compiled from source. Signed-off-by: Anton Tolchanov --- net/dns/manager_darwin.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/dns/manager_darwin.go b/net/dns/manager_darwin.go index e92352c80..065bdd72a 100644 --- a/net/dns/manager_darwin.go +++ b/net/dns/manager_darwin.go @@ -6,7 +6,6 @@ package dns import ( "bytes" - "errors" "os" "go4.org/mem" @@ -85,7 +84,7 @@ func (c *darwinConfigurator) SetDNS(cfg OSConfig) error { } func (c *darwinConfigurator) GetBaseConfig() (OSConfig, error) { - return OSConfig{}, errors.New("[unexpected] unreachable") + return OSConfig{}, ErrGetBaseConfigNotSupported } const macResolverFileHeader = "# Added by tailscaled\n"