mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
* Authoritative Answer - DNSKEY * Improve Style
This commit is contained in:
@@ -26,6 +26,7 @@ func (d Dnssec) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
|
||||
for _, z := range d.zones {
|
||||
if qname == z {
|
||||
resp := d.getDNSKEY(state, z, do)
|
||||
resp.Authoritative = true
|
||||
state.SizeAndDo(resp)
|
||||
w.WriteMsg(resp)
|
||||
return dns.RcodeSuccess, nil
|
||||
|
||||
@@ -129,6 +129,10 @@ func TestLookupDNSKEY(t *testing.T) {
|
||||
}
|
||||
resp := rec.Msg()
|
||||
|
||||
if !resp.Authoritative {
|
||||
t.Errorf("Authoritative Answer should be true, got false")
|
||||
}
|
||||
|
||||
sort.Sort(test.RRSet(resp.Answer))
|
||||
sort.Sort(test.RRSet(resp.Ns))
|
||||
sort.Sort(test.RRSet(resp.Extra))
|
||||
|
||||
Reference in New Issue
Block a user