mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 16:54:15 -04:00
@@ -41,6 +41,9 @@ func (wh Whoami) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
|
|||||||
|
|
||||||
srv := new(dns.SRV)
|
srv := new(dns.SRV)
|
||||||
srv.Hdr = dns.RR_Header{Name: "_" + state.Proto() + "." + state.QName(), Rrtype: dns.TypeSRV, Class: state.QClass()}
|
srv.Hdr = dns.RR_Header{Name: "_" + state.Proto() + "." + state.QName(), Rrtype: dns.TypeSRV, Class: state.QClass()}
|
||||||
|
if state.QName() == "." {
|
||||||
|
srv.Hdr.Name = "_" + state.Proto() + state.QName()
|
||||||
|
}
|
||||||
port, _ := strconv.Atoi(state.Port())
|
port, _ := strconv.Atoi(state.Port())
|
||||||
srv.Port = uint16(port)
|
srv.Port = uint16(port)
|
||||||
srv.Target = "."
|
srv.Target = "."
|
||||||
|
|||||||
Reference in New Issue
Block a user