@@ -76,6 +76,8 @@ type mockDNSData struct {
7676 caaRecords map [string ][]MockCAAPolicy
7777 // A map of host to CNAME records.
7878 cnameRecords map [string ]string
79+ // A map of hostnames that should receive a SERVFAIL response for all queries.
80+ servFailRecords map [string ]bool
7981}
8082
8183// MockCAAPolicy holds a tag and a value for a CAA record. See
@@ -133,12 +135,13 @@ func New(config Config) (*ChallSrv, error) {
133135 tlsALPNOne : make (map [string ]string ),
134136 redirects : make (map [string ]string ),
135137 dnsMocks : mockDNSData {
136- defaultIPv4 : defaultIPv4 ,
137- defaultIPv6 : defaultIPv6 ,
138- aRecords : make (map [string ][]string ),
139- aaaaRecords : make (map [string ][]string ),
140- caaRecords : make (map [string ][]MockCAAPolicy ),
141- cnameRecords : make (map [string ]string ),
138+ defaultIPv4 : defaultIPv4 ,
139+ defaultIPv6 : defaultIPv6 ,
140+ aRecords : make (map [string ][]string ),
141+ aaaaRecords : make (map [string ][]string ),
142+ caaRecords : make (map [string ][]MockCAAPolicy ),
143+ cnameRecords : make (map [string ]string ),
144+ servFailRecords : make (map [string ]bool ),
142145 },
143146 }
144147
0 commit comments