summaryrefslogtreecommitdiff
path: root/fix.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-01 21:47:10 -0500
committerJeff Carr <[email protected]>2024-11-01 21:47:10 -0500
commita4659ec59524279e5a80cd299491fe0a6dbf208a (patch)
tree01aa4a2e852430cc3050dd26ac2cbaaf3fc1320e /fix.go
parent42ca387a49857c6a179650c4296384ce74c1e3d1 (diff)
still compilesv0.22.1
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'fix.go')
-rw-r--r--fix.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/fix.go b/fix.go
index 4025c34..e4fdac6 100644
--- a/fix.go
+++ b/fix.go
@@ -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()