summaryrefslogtreecommitdiff
path: root/hostnameStatusWindow.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 /hostnameStatusWindow.go
parent42ca387a49857c6a179650c4296384ce74c1e3d1 (diff)
still compilesv0.22.1
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'hostnameStatusWindow.go')
-rw-r--r--hostnameStatusWindow.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/hostnameStatusWindow.go b/hostnameStatusWindow.go
index c37f430..0f5d777 100644
--- a/hostnameStatusWindow.go
+++ b/hostnameStatusWindow.go
@@ -234,6 +234,17 @@ func (hs *hostnameStatus) GetIPv6() []string {
return strings.Split(tmp, "\n")
}
+func (hs *hostnameStatus) GetIPv4() []string {
+ if !hs.Ready() {
+ return nil
+ }
+ // clean out any blank lines
+ // todo: fix this whole hacky thing
+ tmp := hs.dnsA.String()
+ tmp = strings.TrimSpace(tmp)
+ return strings.Split(tmp, "\n")
+}
+
func (hs *hostnameStatus) updateStatus() {
if !hs.Ready() {
return
@@ -349,7 +360,7 @@ func (hs *hostnameStatus) verifyIPv6() (bool, error) {
log.Log(INFO, "What are the AAAA resource records in DNS?")
for _, aaaa := range me.statusDNS.GetIPv6() {
- log.Log(INFO, "FOUND DNS AAAA ip", aaaa)
+ // log.Log(INFO, "FOUND DNS AAAA ip", aaaa)
dnsAAAA[aaaa] = "dns"
}