Skip to content

Commit

Permalink
empty + ns = valid
Browse files Browse the repository at this point in the history
  • Loading branch information
matti committed Aug 7, 2024
1 parent 5b70679 commit a66be3b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@ func harder(id string, question dns.Question, recursionDesired bool, currentUpst
// "Zero", response.Zero,
// )
} else if len(response.Answer) == 0 {
logger(id, "EMPTY", question, upstream, rtt.String(), strconv.Itoa(try))
if len(response.Ns) > 0 {
logger(id, "EMPTYNS", question, upstream, rtt.String(), strconv.Itoa(try))
responses <- response
return
} else {
logger(id, "EMPTY", question, upstream, rtt.String(), strconv.Itoa(try))
}
} else {
event(upstream, "got")
logger(id, "GOT", question, upstream, rtt.String(), strconv.Itoa(try))
Expand Down

0 comments on commit a66be3b

Please sign in to comment.