hashicorp/mdns — pull request #26 by brutella (2014-11-07 12:34:40+00:00)
Title: Respond to _services._dns-sd._udp.<domain> dns query

After some debugging, I found that the library does not handle queries for `_services._dns-sd._udp.local`. I found some info about this query and how to respond to it

- From the [mdns RFC][mdns-rfc]

> [...] A DNS query for PTR records with the name "_services._dns-sd._udp." yields a set of PTR records, where the rdata of each PTR record is the two-label name, plus the same domain, e.g. "_http._tcp.". [...]

- Another mDNS client [implements](https://github.com/maccman/bp-bonjour/blob/2b00f8e640a48e9233aa82bb90d5714180dd264a/net-mdns/lib/net/dns/mdns.rb#L1015-1022) it.

It seems to work well and the service also appears in Bonjour browsers (OS X, iOS) when the response for this query is the PTR record.

[mdns-rfc]: https://tools.ietf.org/html/rfc6762