Pull request: 1868 fix rdns

Merge in DNS/adguard-home from 1868-rdns-ipv6 to master

Updates .
Updates .

Squashed commit of the following:

commit 53d67ecf17ed4f9c544344288b58f3596c7246e2
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Apr 13 16:18:33 2021 +0300

    all: imp code, docs

commit 2bc15941b87f92b6fa0a7568538e02700a4385a3
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Apr 13 16:09:08 2021 +0300

    all: imp code
This commit is contained in:
Eugene Burkov 2021-04-13 16:23:36 +03:00
parent 773f02cf7d
commit d7b2d63e4c
7 changed files with 85 additions and 8 deletions
internal/home

View file

@ -135,7 +135,8 @@ func TestRDNS_WorkerLoop(t *testing.T) {
locUpstream := &aghtest.TestUpstream{
Reverse: map[string][]string{
"192.168.1.1": {"local.domain"},
"192.168.1.1": {"local.domain"},
"2a00:1450:400c:c06::93": {"ipv6.domain"},
},
}
errUpstream := &aghtest.TestErrUpstream{
@ -157,6 +158,11 @@ func TestRDNS_WorkerLoop(t *testing.T) {
wantLog: `rdns: resolving "192.168.1.2": errupstream: 1234`,
name: "resolve_error",
cliIP: net.IP{192, 168, 1, 2},
}, {
ups: locUpstream,
wantLog: "",
name: "ipv6_good",
cliIP: net.ParseIP("2a00:1450:400c:c06::93"),
}}
for _, tc := range testCases {