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

@@ -57,7 +57,7 @@ func TestGenAnswerHTTPS_andSVCB(t *testing.T) {
want = &dns.SVCB{
Hdr: s.hdr(req, dns.TypeSVCB),
Priority: prio,
Target: host,
Target: dns.Fqdn(host),
}
if kv == nil {
@@ -122,7 +122,7 @@ func TestGenAnswerHTTPS_andSVCB(t *testing.T) {
}, {
svcb: dnssvcb("no-default-alpn", ""),
want: wantsvcb(&dns.SVCBNoDefaultAlpn{}),
name: "no-default-alpn",
name: "no_default_alpn",
}, {
svcb: dnssvcb("port", "8080"),
want: wantsvcb(&dns.SVCBPort{Port: 8080}),
@@ -130,7 +130,7 @@ func TestGenAnswerHTTPS_andSVCB(t *testing.T) {
}, {
svcb: dnssvcb("port", "1005008080"),
want: wantsvcb(nil),
name: "port",
name: "bad_port",
}}
for _, tc := range testCases {