net/dns: return error from NewOSManager, use it to initialize NM.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-04-12 15:51:37 -07:00
parent 4d142ebe06
commit 854d5d36a1
16 changed files with 67 additions and 50 deletions

View File

@@ -39,7 +39,7 @@ type windowsManager struct {
nrptWorks bool
}
func NewOSConfigurator(logf logger.Logf, interfaceName string) OSConfigurator {
func NewOSConfigurator(logf logger.Logf, interfaceName string) (OSConfigurator, error) {
ret := windowsManager{
logf: logf,
guid: interfaceName,
@@ -56,7 +56,7 @@ func NewOSConfigurator(logf logger.Logf, interfaceName string) OSConfigurator {
ret.delKey(nrptBase)
}
return ret
return ret, nil
}
// keyOpenTimeout is how long we wait for a registry key to