Commit 20325863 authored by Miek Gieben's avatar Miek Gieben Committed by Yong Tang

Scrub results in forwarding/lookup (#2331)

Signed-off-by: default avatarMiek Gieben <miek@miek.nl>
parent fc96c642
......@@ -50,6 +50,7 @@ func (f *Forward) Forward(state request.Request) (*dns.Msg, error) {
return state.ErrorMessage(dns.RcodeFormatError), nil
}
ret = state.Scrub(ret)
return ret, err
}
......@@ -78,7 +79,7 @@ func (f *Forward) Lookup(state request.Request, name string, typ uint16) (*dns.M
}
// NewLookup returns a Forward that can be used for plugin that need an upstream to resolve external names.
// Note that the caller must run Close on the forward to stop the health checking goroutines.
// Note that the caller MUST run Close on the forward to stop the health checking goroutines.
func NewLookup(addr []string) *Forward {
f := New()
for i := range addr {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment