net/dns: error out on linux if /etc/resolv.conf can't be read.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson 2021-04-14 15:35:32 -07:00
parent 1f9b73a531
commit 4849a4d3c8

View File

@ -23,6 +23,9 @@ func NewOSConfigurator(logf logger.Logf, interfaceName string) (OSConfigurator,
if os.IsNotExist(err) {
return newDirectManager()
}
if err != nil {
return nil, fmt.Errorf("reading /etc/resolv.conf: %w", err)
}
switch resolvOwner(bs) {
case "systemd-resolved":