Compile fixes and make it work

This commit is contained in:
Miek Gieben
2016-11-10 12:58:40 +00:00
parent d383f279a0
commit 9328a8e7a4
6 changed files with 9 additions and 3 deletions

View File

@@ -136,6 +136,8 @@ var exernalTestCases = []test.Case{
Qname: "external.example.org.", Qtype: dns.TypeA,
Answer: []dns.RR{
test.CNAME("external.example.org. 1800 CNAME www.example.net."),
// magic 303 TTL that says: don't check TTL.
test.A("www.example.net. 303 IN A 93.184.216.34"),
},
},
}

View File

@@ -339,10 +339,12 @@ func cnameForType(targets []dns.RR, origQtype uint16) []dns.RR {
func (z *Zone) externalLookup(state request.Request, target string, qtype uint16) []dns.RR {
m, e := z.Proxy.Lookup(state, target, qtype)
if e != nil || m == nil {
if e != nil {
println(e.Error())
// TODO(miek): debugMsg for this as well? Log?
return nil
}
println(m.String())
return m.Answer
}