net/dns: set resolved DefaultRoute setting according to split-dns mode.

Signed-off-by: David Anderson <danderson@tailscale.com>
pull/1691/head
David Anderson 4 years ago
parent cca230cc23
commit 3d81e6260b

@ -185,6 +185,10 @@ func (m resolvedManager) SetDNS(config OSConfig) error {
return fmt.Errorf("setLinkDomains: %w", err)
}
if call := resolved.CallWithContext(ctx, "org.freedesktop.resolve1.Manager.SetLinkDefaultRoute", 0, iface.Index, len(config.MatchDomains) == 0); call.Err != nil {
return fmt.Errorf("setLinkDefaultRoute: %w", err)
}
// Some best-effort setting of things, but resolved should do the
// right thing if these fail (e.g. a really old resolved version
// or something).

Loading…
Cancel
Save