only one question per query
This commit is contained in:
parent
a71b619763
commit
7f40a04638
10
coolDns.go
10
coolDns.go
@ -278,8 +278,13 @@ func handleRequest(w dns.ResponseWriter, r *dns.Msg, zone zoneView) {
|
|||||||
m.SetReply(r)
|
m.SetReply(r)
|
||||||
m.Authoritative = true
|
m.Authoritative = true
|
||||||
|
|
||||||
// maybe only support one question per query like most servers do it ???
|
// Only support one question per query because all the other server also does that
|
||||||
for _, q := range r.Question {
|
if len(r.Question) != 1 {
|
||||||
|
rcodeRequest(w, r, dns.RcodeServerFailure)
|
||||||
|
}
|
||||||
|
|
||||||
|
q := r.Question[0]
|
||||||
|
|
||||||
rrs := zone.rr[q.Qtype]
|
rrs := zone.rr[q.Qtype]
|
||||||
|
|
||||||
// Handle ANY
|
// Handle ANY
|
||||||
@ -339,7 +344,6 @@ func handleRequest(w dns.ResponseWriter, r *dns.Msg, zone zoneView) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
w.WriteMsg(m)
|
w.WriteMsg(m)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user