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