mirror of
https://github.com/miekg/dns.git
synced 2025-10-12 18:31:00 +02:00
dont allocate at the beginning
This commit is contained in:
parent
bd400abbb9
commit
bae774176f
@ -6,10 +6,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func serve(w dns.ResponseWriter, req *dns.Msg, z *dns.Zone) {
|
func serve(w dns.ResponseWriter, req *dns.Msg, z *dns.Zone) {
|
||||||
// See RFC 1035...
|
|
||||||
m := new(dns.Msg)
|
|
||||||
m.SetRcode(req, dns.RcodeNameError)
|
|
||||||
|
|
||||||
log.Printf("incoming %s %d\n", req.Question[0].Name, req.Question[0].Qtype)
|
log.Printf("incoming %s %d\n", req.Question[0].Name, req.Question[0].Qtype)
|
||||||
// Check for referral
|
// Check for referral
|
||||||
// if we find something with NonAuth = true, it means
|
// if we find something with NonAuth = true, it means
|
||||||
@ -35,8 +31,6 @@ func serve(w dns.ResponseWriter, req *dns.Msg, z *dns.Zone) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
apex := z.Find(z.Origin)
|
apex := z.Find(z.Origin)
|
||||||
log.Println("Upper zone", nss.Name)
|
|
||||||
log.Println("It auth value", nss.NonAuth)
|
|
||||||
|
|
||||||
// Referral need support from the radix tree, successor?
|
// Referral need support from the radix tree, successor?
|
||||||
// Name found, look for type, yes, answer, no
|
// Name found, look for type, yes, answer, no
|
||||||
@ -58,5 +52,9 @@ func serve(w dns.ResponseWriter, req *dns.Msg, z *dns.Zone) {
|
|||||||
w.Write(m)
|
w.Write(m)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// See RFC 1035...
|
||||||
|
m := new(dns.Msg)
|
||||||
|
m.SetRcode(req, dns.RcodeNameError)
|
||||||
|
|
||||||
w.Write(m)
|
w.Write(m)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user