aboutsummaryrefslogtreecommitdiff
path: root/plugin/pkg/response
diff options
context:
space:
mode:
authorGravatar Chris O'Haver <cohaver@infoblox.com> 2020-12-15 08:02:15 -0500
committerGravatar GitHub <noreply@github.com> 2020-12-15 14:02:15 +0100
commit9cb53487ecc7ded29672b22bc7716a8eec095865 (patch)
treef369a9f47671f2117c78e7a94c4309a6426b6ac3 /plugin/pkg/response
parent45bf23f14526ecca4e72a7c5adc84e0e92f490e4 (diff)
downloadcoredns-9cb53487ecc7ded29672b22bc7716a8eec095865.tar.gz
coredns-9cb53487ecc7ded29672b22bc7716a8eec095865.tar.zst
coredns-9cb53487ecc7ded29672b22bc7716a8eec095865.zip
respond with REFUSED when max_concurrent is exceeded to avoid caching it (#4326)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
Diffstat (limited to 'plugin/pkg/response')
-rw-r--r--plugin/pkg/response/typify_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugin/pkg/response/typify_test.go b/plugin/pkg/response/typify_test.go
index fca6ba100..3d9abdf7c 100644
--- a/plugin/pkg/response/typify_test.go
+++ b/plugin/pkg/response/typify_test.go
@@ -60,6 +60,16 @@ func TestTypifyImpossible(t *testing.T) {
}
}
+func TestTypifyRefused(t *testing.T) {
+ m := new(dns.Msg)
+ m.SetQuestion("foo.example.org.", dns.TypeA)
+ m.Rcode = dns.RcodeRefused
+ mt, _ := Typify(m, time.Now().UTC())
+ if mt != OtherError {
+ t.Errorf("Refused message not typified as OtherError, got %s", mt)
+ }
+}
+
func delegationMsg() *dns.Msg {
return &dns.Msg{
Ns: []dns.RR{