fix bug caused by Google's attack on DNS infrastructure.

This commit is contained in:
cynic 2024-08-18 18:30:59 +00:00
parent 7e32f63216
commit 4a163fde36

View File

@ -145,6 +145,9 @@ func (s *MeshnameServer) handleMeshnameRequest(w dns.ResponseWriter, r *dns.Msg)
rm := new(dns.Msg)
rm.RecursionDesired = true
rm.Question = questions
// always use lowercase internally among meshname instances
rm.Question[0].Name = strings.ToLower(rm.Question[0].Name)
s.log.Debugln(rm.Question[0].Name) // DEBUG
// add alternative port number
portNumbers := []string{"53"}
portNumbers = append([]string{s.acmePort}, portNumbers...) // TODO: rename acmePort to alternativePort