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 <anton@tailscale.com>
This commit is contained in:
Anton Tolchanov 2022-10-30 08:35:46 +00:00 committed by Anton Tolchanov
parent 193afe19cb
commit e25ab75795

View File

@ -6,7 +6,6 @@
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"