diff options
| author | Shulhan <ms@kilabit.info> | 2019-04-12 22:26:16 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2019-04-12 22:26:16 +0700 |
| commit | f5540a23082e5dcd506f41ff0e2ac4e7d7f6ef79 (patch) | |
| tree | e276a3813fb0d61e224deeef45b07daf08a5ab85 | |
| parent | dd7a23af81939453c3bb46a44676e8523b69ee5c (diff) | |
| download | pakakeh.go-f5540a23082e5dcd506f41ff0e2ac4e7d7f6ef79.tar.xz | |
dns: cache response with empty answer resource record
As long as the response is OK (response code 0), we should accept response
with no answer RR. One of the case is when query is AAAA and the domain
does not have IPv6 address, it would response with empty answer with
response code OK.
| -rw-r--r-- | lib/dns/answer.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dns/answer.go b/lib/dns/answer.go index 80d1dbb8..64955d12 100644 --- a/lib/dns/answer.go +++ b/lib/dns/answer.go @@ -41,7 +41,7 @@ type answer struct { // to current timestamp. // func newAnswer(msg *Message, isLocal bool) (an *answer) { - if msg == nil || msg.Question == nil || len(msg.Answer) == 0 { + if msg == nil || msg.Question == nil { return nil } |
