Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions proxy/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ func (c *cache) unpackItem(data []byte, req *dns.Msg) (ci *cacheItem, expired bo
return nil, expired
}

// Don't return expired ServFail response from cache, otherwise it may stop
// future refresh.
if m.Rcode == dns.RcodeServerFailure && expired {
return nil, expired
}

res := (&dns.Msg{}).SetRcode(req, m.Rcode)
res.AuthenticatedData = m.AuthenticatedData
res.RecursionAvailable = m.RecursionAvailable
Expand Down