diff options
Diffstat (limited to 'plugin/acl/acl_test.go')
-rw-r--r-- | plugin/acl/acl_test.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/plugin/acl/acl_test.go b/plugin/acl/acl_test.go index bf0c6f6f7..4c6df95e5 100644 --- a/plugin/acl/acl_test.go +++ b/plugin/acl/acl_test.go @@ -146,6 +146,34 @@ func TestACLServeDNS(t *testing.T) { false, }, { + "Filter 1 FILTERED", + `acl example.org { + filter type A net 192.168.0.0/16 + }`, + []string{}, + args{ + "www.example.org.", + "192.168.0.2", + dns.TypeA, + }, + dns.RcodeSuccess, + false, + }, + { + "Filter 1 ALLOWED", + `acl example.org { + filter type A net 192.168.0.0/16 + }`, + []string{}, + args{ + "www.example.org.", + "192.167.0.2", + dns.TypeA, + }, + dns.RcodeSuccess, + false, + }, + { "Whitelist 1 ALLOWED", `acl example.org { allow net 192.168.0.0/16 |