updates
This commit is contained in:
parent
d0641c7cb9
commit
d4c5036377
|
@ -15,14 +15,13 @@ func serve(w dns.ResponseWriter, req *dns.Msg, z *dns.Zone) {
|
||||||
// look up name -> yes, continue, no -> nxdomain
|
// look up name -> yes, continue, no -> nxdomain
|
||||||
node := z.Find(req.Question[0].Name)
|
node := z.Find(req.Question[0].Name)
|
||||||
if node == nil {
|
if node == nil {
|
||||||
log.Printf("nothing found")
|
|
||||||
m := new(dns.Msg)
|
m := new(dns.Msg)
|
||||||
m.SetRcode(req, dns.RcodeNameError)
|
m.SetRcode(req, dns.RcodeNameError)
|
||||||
w.Write(m)
|
w.Write(m)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
apex := z.Find(z.Origin)
|
apex := z.Find(z.Origin)
|
||||||
// Referral?
|
// Referral need support from the radix tree, successor?
|
||||||
// Name found, look for type, yes, answer, no
|
// Name found, look for type, yes, answer, no
|
||||||
if rrs, ok := node.RR[req.Question[0].Qtype]; ok {
|
if rrs, ok := node.RR[req.Question[0].Qtype]; ok {
|
||||||
// Need to look at class to but... no
|
// Need to look at class to but... no
|
||||||
|
|
Loading…
Reference in New Issue