diff options
Diffstat (limited to 'fix.go')
| -rw-r--r-- | fix.go | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -57,6 +57,25 @@ func fix() bool { return true } +// returns true if the IP address is in DNS +func ValidDNS(ip string) bool { + // check for DNS AAAA RR's (Resource Record) + for _, aaaa := range me.statusDNS.GetIPv6() { + log.Log(WARN, "statusDNS.GetIPv6() FOUND DNS AAAA ip", aaaa) + if ip == aaaa { + return true + } + } + // check for DNS A RR's (Resource Record) + for _, a := range me.statusDNS.GetIPv4() { + log.Log(WARN, "statusDNS.GetIPv4() FOUND DNS A ip", a) + if ip == a { + return true + } + } + return false +} + func fixIPv6dns() bool { log.Log(INFO, "What are my IPv6 addresses?") var broken bool = false @@ -137,6 +156,11 @@ func deleteFromDNS(aaaa string) bool { return false } +// returns TRUE if there is a Resource Record in DNS for the AAAA value +func inDNS(aaaa string) bool { + return false +} + func addToDNS(aaaa string) bool { log.Log(CHANGE, "Add this to DNS !!!!", aaaa) api := me.statusDNS.API() |
