mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
@@ -33,28 +33,28 @@ func TestRequestShouldIntercept(t *testing.T) {
|
|||||||
name: "should intercept request from IPv6 network - AAAA - IN",
|
name: "should intercept request from IPv6 network - AAAA - IN",
|
||||||
allowIpv4: true,
|
allowIpv4: true,
|
||||||
remoteIP: "::1",
|
remoteIP: "::1",
|
||||||
msg: new(dns.Msg).SetQuestion("example.com", dns.TypeAAAA),
|
msg: new(dns.Msg).SetQuestion("example.com", dns.TypeAAAA),
|
||||||
want: true,
|
want: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "should intercept request from IPv4 network - AAAA - IN",
|
name: "should intercept request from IPv4 network - AAAA - IN",
|
||||||
allowIpv4: true,
|
allowIpv4: true,
|
||||||
remoteIP: "127.0.0.1",
|
remoteIP: "127.0.0.1",
|
||||||
msg: new(dns.Msg).SetQuestion("example.com", dns.TypeAAAA),
|
msg: new(dns.Msg).SetQuestion("example.com", dns.TypeAAAA),
|
||||||
want: true,
|
want: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "should not intercept request from IPv4 network - AAAA - IN",
|
name: "should not intercept request from IPv4 network - AAAA - IN",
|
||||||
allowIpv4: false,
|
allowIpv4: false,
|
||||||
remoteIP: "127.0.0.1",
|
remoteIP: "127.0.0.1",
|
||||||
msg: new(dns.Msg).SetQuestion("example.com", dns.TypeAAAA),
|
msg: new(dns.Msg).SetQuestion("example.com", dns.TypeAAAA),
|
||||||
want: false,
|
want: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "should not intercept request from IPv6 network - A - IN",
|
name: "should not intercept request from IPv6 network - A - IN",
|
||||||
allowIpv4: false,
|
allowIpv4: false,
|
||||||
remoteIP: "::1",
|
remoteIP: "::1",
|
||||||
msg: new(dns.Msg).SetQuestion("example.com", dns.TypeA),
|
msg: new(dns.Msg).SetQuestion("example.com", dns.TypeA),
|
||||||
want: false,
|
want: false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user