middleware/cache: don't cache expired RRSIGs (#641)
Check message for expired sig and don't cache those. Aside: This hack of caching entire messages is probably something we should stop doing at some point in the future and do this on a per RRset basis. Fixes #367 #635
This commit is contained in:
parent
1f63e639e4
commit
7d39c2ba51
7 changed files with 172 additions and 62 deletions
2
middleware/cache/cache.go
vendored
2
middleware/cache/cache.go
vendored
|
@ -63,7 +63,7 @@ type ResponseWriter struct {
|
|||
// WriteMsg implements the dns.ResponseWriter interface.
|
||||
func (c *ResponseWriter) WriteMsg(res *dns.Msg) error {
|
||||
do := false
|
||||
mt, opt := response.Typify(res)
|
||||
mt, opt := response.Typify(res, time.Now().UTC())
|
||||
if opt != nil {
|
||||
do = opt.Do()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue