From 72bf80533ee14a997c7316bbaf7a2f2150011299 Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Wed, 24 Jul 2024 14:02:30 +0700 Subject: [PATCH] cmd/cli: always run dns watchdog on Darwin/Windows --- cmd/cli/prog.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cmd/cli/prog.go b/cmd/cli/prog.go index 239b044..34cdc45 100644 --- a/cmd/cli/prog.go +++ b/cmd/cli/prog.go @@ -538,14 +538,10 @@ func (p *prog) setDNS() { // dnsWatchdog watches for DNS changes on Darwin and Windows then re-applying ctrld's settings. // This is only works when deactivation pin set. func (p *prog) dnsWatchdog(iface *net.Interface, nameservers []string, allIfaces bool) { - switch runtime.GOOS { - case "darwin", "windows": - default: - return - } - if deactivationPinNotSet() { + if !requiredMultiNICsConfig() { return } + p.dnsWatchDogOnce.Do(func() { mainLog.Load().Debug().Msg("start DNS settings watchdog") ns := nameservers