Handle multiple mDNS questions as allowed in RFC6762

This commit is contained in:
richtr 2014-09-08 16:06:16 +02:00
parent 70462deb06
commit 4719107d49

View File

@ -131,9 +131,11 @@ func (s *Server) handleQuery(query *dns.Msg, from net.Addr) error {
// Handle each question // Handle each question
if len(query.Question) > 0 { if len(query.Question) > 0 {
if err := s.handleQuestion(query.Question[0], &resp); err != nil { for i, _ := range query.Question {
if err := s.handleQuestion(query.Question[i], &resp); err != nil {
log.Printf("[ERR] mdns: failed to handle question %v: %v", log.Printf("[ERR] mdns: failed to handle question %v: %v",
query.Question[0], err) query.Question[i], err)
}
} }
} }