Browse Source

ext client logic for peer updates

afeiszli 3 years ago
parent
commit
d7acdee86e
1 changed files with 2 additions and 0 deletions
  1. 2 0
      netclient/local/dns.go

+ 2 - 0
netclient/local/dns.go

@@ -91,6 +91,7 @@ func UpdateDNS(ifacename string, network string, nameserver string) error {
 	return err
 }
 
+// IsDNSReachable - checks if nameserver is reachable
 func IsDNSReachable(nameserver string) bool {
 	port := "53"
 	protocols := [2]string{"tcp", "udp"}
@@ -109,6 +110,7 @@ func IsDNSReachable(nameserver string) bool {
 	return true
 }
 
+// IsDNSWorking - checks if record is returned by correct nameserver
 func IsDNSWorking(network string, nameserver string) bool {
 	var isworking bool
 	servers, err := net.LookupNS("netmaker" + "." + "network")