net/dns: exhaustively test DNS selection paths for linux.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-09-04 23:40:48 -07:00
parent c071bcda33
commit 10547d989d
4 changed files with 290 additions and 73 deletions

View File

@ -23,7 +23,14 @@ func NewOSConfigurator(logf logger.Logf, _ string) (OSConfigurator, error) {
switch resolvOwner(bs) {
case "resolvconf":
return newResolvconfManager(logf, getResolvConfVersion)
switch resolvconfStyle() {
case "":
return newDirectManager(), nil
case "debian":
return newDebianResolvconfManager(logf)
case "openresolv":
return newOpenresolvManager()
}
default:
return newDirectManager(), nil
}