aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-11-22 20:29:25 +0000
committerGravatar Yong Tang <yong.tang.github@outlook.com> 2018-11-23 05:29:25 +0900
commit20325863997b44b78b891345cf6b682c1307b954 (patch)
tree73e4c4d21413ebb523dfe60f39d3c5aac89018e4
parentfc96c642636ee0b57f21613aed2a52eada380be9 (diff)
downloadcoredns-20325863997b44b78b891345cf6b682c1307b954.tar.gz
coredns-20325863997b44b78b891345cf6b682c1307b954.tar.zst
coredns-20325863997b44b78b891345cf6b682c1307b954.zip
Scrub results in forwarding/lookup (#2331)
Signed-off-by: Miek Gieben <miek@miek.nl>
-rw-r--r--plugin/forward/lookup.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/forward/lookup.go b/plugin/forward/lookup.go
index f6c9a0745..855230b9a 100644
--- a/plugin/forward/lookup.go
+++ b/plugin/forward/lookup.go
@@ -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 {