add localTCPAddr := dnssecsocket.ResolveIPv6hostname("librem15.lab.wit.com")
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
9070d87fba
commit
d38dbbdf70
|
@ -146,3 +146,10 @@ func Dnstrace(hostname string, qtypestr string) dns.RR {
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ResolveIPv6hostname(hostname string) *net.TCPAddr {
|
||||||
|
dnsRR := Dnstrace(hostname, "AAAA")
|
||||||
|
aaaa := dns.Field(dnsRR, 1)
|
||||||
|
localTCPAddr, _ := net.ResolveTCPAddr("tcp", aaaa)
|
||||||
|
return localTCPAddr
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue