Correctly detect that an answer has been truncated

This commit is contained in:
Sean Chittenden 2016-03-29 19:52:31 -07:00
parent c0aa155e61
commit c3dcd9acfb

View file

@ -509,7 +509,7 @@ func trimUDPAnswers(config *DNSConfig, resp *dns.Msg) (trimmed bool) {
resp.Answer = resp.Answer[:len(resp.Answer)-1] resp.Answer = resp.Answer[:len(resp.Answer)-1]
} }
return len(resp.Answer) < maxAnswers return len(resp.Answer) < numAnswers
} }
// serviceLookup is used to handle a service query // serviceLookup is used to handle a service query