plugin/{forward,proxy}: check for truncated (#1644)

Check for trunacted in the lookup function as well and use the Match
function here as well.
This commit is contained in:
Miek Gieben
2018-03-31 15:31:03 +01:00
committed by GitHub
parent f19a3b24ca
commit fd1501e918
4 changed files with 40 additions and 16 deletions

View File

@@ -92,6 +92,11 @@ func (p Proxy) lookup(state request.Request) (*dns.Msg, error) {
atomic.AddInt64(&host.Conns, -1)
if backendErr == nil {
if !state.Match(reply) {
return state.ErrorMessage(dns.RcodeFormatError), nil
}
return reply, nil
}