mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-09-29 13:51:51 +02:00
cmd/cli: use currentStaticDNS when checking DNS changed
The dns watchdog is spawned *after* DNS was set by ctrld, thus it should use the currentStaticDNS for getting the static DNS, instead of relying on currentDNS, which could be system wide instead of per interfaces.
This commit is contained in:
1 parent
8b98faa441
commit
e8d3ed1acd
1 file changed
+1
-1
+1
-1
@@ -956,7 +956,7 @@ func savedStaticNameservers(iface *net.Interface) []string {
|
|||||||
// dnsChanged reports whether DNS settings for given interface was changed.
|
// dnsChanged reports whether DNS settings for given interface was changed.
|
||||||
// The caller must sort the nameservers before calling this function.
|
// The caller must sort the nameservers before calling this function.
|
||||||
func dnsChanged(iface *net.Interface, nameservers []string) bool {
|
func dnsChanged(iface *net.Interface, nameservers []string) bool {
|
||||||
curNameservers := currentDNS(iface)
|
curNameservers, _ := currentStaticDNS(iface)
|
||||||
slices.Sort(curNameservers)
|
slices.Sort(curNameservers)
|
||||||
return !slices.Equal(curNameservers, nameservers)
|
return !slices.Equal(curNameservers, nameservers)
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user