mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-09-29 13:51:51 +02:00
cmd/cli: always run dns watchdog on Darwin/Windows
This commit is contained in:
1 parent
9ddedf926e
commit
72bf80533e
1 file changed
+2
-6
+2
-6
@@ -538,14 +538,10 @@ func (p *prog) setDNS() {
|
|||||||
// dnsWatchdog watches for DNS changes on Darwin and Windows then re-applying ctrld's settings.
|
// dnsWatchdog watches for DNS changes on Darwin and Windows then re-applying ctrld's settings.
|
||||||
// This is only works when deactivation pin set.
|
// This is only works when deactivation pin set.
|
||||||
func (p *prog) dnsWatchdog(iface *net.Interface, nameservers []string, allIfaces bool) {
|
func (p *prog) dnsWatchdog(iface *net.Interface, nameservers []string, allIfaces bool) {
|
||||||
switch runtime.GOOS {
|
if !requiredMultiNICsConfig() {
|
||||||
case "darwin", "windows":
|
|
||||||
default:
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if deactivationPinNotSet() {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
p.dnsWatchDogOnce.Do(func() {
|
p.dnsWatchDogOnce.Do(func() {
|
||||||
mainLog.Load().Debug().Msg("start DNS settings watchdog")
|
mainLog.Load().Debug().Msg("start DNS settings watchdog")
|
||||||
ns := nameservers
|
ns := nameservers
|
||||||
|
|||||||
Reference in new issue
Block a user