middleware/file: Add CNAME chain support (#400)
Up till now we would only chase 1 CNAME. Spec requires we will chase all. This PR add support for this. Up to 8 CNAMEs are chased (this could be longer, by just checking for cycles, but 8 seems enough for now). Also add RRSIG of the first CNAME for DNSSEC.
This commit is contained in:
parent
6abbe231e5
commit
4ef53081c5
4 changed files with 157 additions and 16 deletions
|
@ -54,7 +54,7 @@ var dsTestCases = []test.Case{
|
|||
func TestLookupDS(t *testing.T) {
|
||||
zone, err := Parse(strings.NewReader(dbMiekNLDelegation), testzone, "stdin")
|
||||
if err != nil {
|
||||
t.Fatalf("expect no error when reading zone, got %q", err)
|
||||
t.Fatalf("Expected no error when reading zone, got %q", err)
|
||||
}
|
||||
|
||||
fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{testzone: zone}, Names: []string{testzone}}}
|
||||
|
@ -66,7 +66,7 @@ func TestLookupDS(t *testing.T) {
|
|||
rec := dnsrecorder.New(&test.ResponseWriter{})
|
||||
_, err := fm.ServeDNS(ctx, rec, m)
|
||||
if err != nil {
|
||||
t.Errorf("expected no error, got %v\n", err)
|
||||
t.Errorf("Expected no error, got %v\n", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue