Do not invoke the mDNS lookups from the server: they are used from the Zone database now...

Improved DNS server:
- simplify the handlers code, removing duplicated code
- more configuration parameters (eg, we can now disable the cache)
- we can now bind to port 0 and let the server get a free port (so we can get rid of the mess we had in the unit tests...)
This commit is contained in:
Alvaro Saurin committed 2015-05-26 21:20:42 +02:00
1 parent a23462e830
commit 07d15092aa
5 files changed
+231 -181

No files matched your search

+2
View File
@@ -33,6 +33,8 @@ func makeTruncatedReply(r *dns.Msg) *dns.Msg {
return reply
}
type DNSResponseBuilder func(r *dns.Msg, q *dns.Question, addrs []ZoneRecord) *dns.Msg
func makeAddressReply(r *dns.Msg, q *dns.Question, addrs []ZoneRecord) *dns.Msg {
answers := make([]dns.RR, len(addrs))
header := makeHeader(r, q)