mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
cmd/cli: always run dns watchdog on Darwin/Windows
This commit is contained in:
committed by
Cuong Manh Le
parent
9ddedf926e
commit
72bf80533e
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user