request.Match check Response bit as well (#1775)
* request.Match check Response bit as well We should check this bit and reject them as invalid. * Fix test
This commit is contained in:
parent
68b45f5377
commit
0e5e59c327
4 changed files with 24 additions and 4 deletions
1
plugin/cache/cache.go
vendored
1
plugin/cache/cache.go
vendored
|
@ -130,7 +130,6 @@ func (w *ResponseWriter) WriteMsg(res *dns.Msg) error {
|
|||
}
|
||||
|
||||
if key != -1 && duration > 0 {
|
||||
|
||||
if w.state.Match(res) {
|
||||
w.set(res, key, mt, duration)
|
||||
cacheSize.WithLabelValues(w.server, Success).Set(float64(w.pcache.Len()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue