add dns empty response error

This commit is contained in:
Patricio Whittingslow
2026-01-05 11:42:01 -03:00
parent 7698b9fb81
commit 88d5f111da
2 changed files with 10 additions and 2 deletions
+3
View File
@@ -56,6 +56,9 @@ func (s StackRetrying) DoNTP(ntpHost netip.Addr, timeout time.Duration, retries
return -1, errRetriesExceeded
}
func (s StackRetrying) DoLookupIP(host string, timeout time.Duration, retries int) (addrs []netip.Addr, err error) {
if !s.block.async.dnssv.IsValid() {
return nil, errNoDNSServer
}
expectEnd := time.Now().Add(timeout * time.Duration(retries))
for i := 0; i < retries; i++ {
addrs, err = s.block.DoLookupIP(host, timeout)