Pull request: dnsforward: fix fqdn in some dns rewrites

Updates #2498.
Updates #2533.

Squashed commit of the following:

commit 9eec20ac3bee5a914f61f41a789f87dec63e910d
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Mar 15 16:53:29 2021 +0300

    dnsforward: fix fqdn in some dns rewrites
This commit is contained in:
Ainar Garipov
2021-03-15 17:17:16 +03:00
parent 313fd7107f
commit 75ac1a5346
4 changed files with 11 additions and 11 deletions

View File

@@ -138,14 +138,14 @@ func (s *Server) genAnswerMX(req *dns.Msg, mx *rules.DNSMX) (ans *dns.MX) {
return &dns.MX{
Hdr: s.hdr(req, dns.TypeMX),
Preference: mx.Preference,
Mx: mx.Exchange,
Mx: dns.Fqdn(mx.Exchange),
}
}
func (s *Server) genAnswerPTR(req *dns.Msg, ptr string) (ans *dns.PTR) {
return &dns.PTR{
Hdr: s.hdr(req, dns.TypePTR),
Ptr: ptr,
Ptr: dns.Fqdn(ptr),
}
}
@@ -155,7 +155,7 @@ func (s *Server) genAnswerSRV(req *dns.Msg, srv *rules.DNSSRV) (ans *dns.SRV) {
Priority: srv.Priority,
Weight: srv.Weight,
Port: srv.Port,
Target: srv.Target,
Target: dns.Fqdn(srv.Target),
}
}