respond with REFUSED when max_concurrent is exceeded to avoid caching it (#4326)

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
Chris O'Haver
2020-12-15 08:02:15 -05:00
committed by GitHub
parent 45bf23f145
commit 9cb53487ec
3 changed files with 12 additions and 2 deletions

View File

@@ -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{