Skip to content

Commit

Permalink
proxy: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneOne1 committed Feb 3, 2023
1 parent ec1b3d7 commit 7fcd7d8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion proxy/dns64_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ func TestProxy_Resolve_dns64(t *testing.T) {
require.NoError(t, err)
ptrGlobDomain = dns.Fqdn(ptrGlobDomain)

cliIP := &net.TCPAddr{
IP: net.IP{192, 168, 1, 1},
Port: 1234,
}

const (
sectionAnswer = iota
sectionAuthority
Expand Down Expand Up @@ -345,7 +350,10 @@ func TestProxy_Resolve_dns64(t *testing.T) {
testutil.CleanupAndRequireSuccess(t, p.Stop)

req := (&dns.Msg{}).SetQuestion(tc.qname, tc.qtype)
dctx := &DNSContext{Req: req}
dctx := &DNSContext{
Req: req,
Addr: cliIP,
}

err := p.Resolve(dctx)
require.NoError(t, err)
Expand Down

0 comments on commit 7fcd7d8

Please sign in to comment.