summaryrefslogtreecommitdiff
path: root/src/tests/common/acl_tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/common/acl_tests.c')
-rw-r--r--src/tests/common/acl_tests.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/tests/common/acl_tests.c b/src/tests/common/acl_tests.c
index b4232ac..e9af20c 100644
--- a/src/tests/common/acl_tests.c
+++ b/src/tests/common/acl_tests.c
@@ -53,55 +53,55 @@ static int acl_tests_run(int argc, char *argv[])
ok(ret > 0, "acl: new IPv6 address");
// 4. Create simple IPv4 rule
- ret = acl_create(acl, &test_v4, ACL_ACCEPT);
+ ret = acl_create(acl, &test_v4, ACL_ACCEPT, 0);
ok(ret == ACL_ACCEPT, "acl: inserted IPv4 rule");
// 5. Create simple IPv6 rule
- ret = acl_create(acl, &test_v6, ACL_ACCEPT);
+ ret = acl_create(acl, &test_v6, ACL_ACCEPT, 0);
ok(ret == ACL_ACCEPT, "acl: inserted IPv6 rule");
// 6. Create simple IPv4 'any port' rule
sockaddr_t test_v4a;
sockaddr_set(&test_v4a, AF_INET, "20.20.20.20", 0);
- ret = acl_create(acl, &test_v4a, ACL_ACCEPT);
+ ret = acl_create(acl, &test_v4a, ACL_ACCEPT, 0);
ok(ret == ACL_ACCEPT, "acl: inserted IPv4 'any port' rule");
// 7. Attempt to match unmatching address
sockaddr_t unmatch_v4;
sockaddr_set(&unmatch_v4, AF_INET, "10.10.10.10", 24424);
- ret = acl_match(acl, &unmatch_v4);
+ ret = acl_match(acl, &unmatch_v4, 0);
ok(ret == ACL_DENY, "acl: matching non-existing address");
// 8. Attempt to match unmatching IPv6 address
sockaddr_t unmatch_v6;
sockaddr_set(&unmatch_v6, AF_INET6, "2001:db8::1428:57ab", 24424);
- ret = acl_match(acl, &unmatch_v6);
+ ret = acl_match(acl, &unmatch_v6, 0);
ok(ret == ACL_DENY, "acl: matching non-existing IPv6 address");
// 9. Attempt to match matching address
- ret = acl_match(acl, &test_v4);
+ ret = acl_match(acl, &test_v4, 0);
ok(ret == ACL_ACCEPT, "acl: matching existing address");
// 10. Attempt to match matching address
- ret = acl_match(acl, &test_v6);
+ ret = acl_match(acl, &test_v6, 0);
ok(ret == ACL_ACCEPT, "acl: matching existing IPv6 address");
// 11. Attempt to match matching 'any port' address
sockaddr_t match_v4a;
sockaddr_set(&match_v4a, AF_INET, "20.20.20.20", 24424);
- ret = acl_match(acl, &match_v4a);
+ ret = acl_match(acl, &match_v4a, 0);
ok(ret == ACL_ACCEPT, "acl: matching existing IPv4 'any port' address");
// 12. Attempt to match matching address without matching port
sockaddr_set(&unmatch_v4, AF_INET, "127.0.0.1", 54321);
- ret = acl_match(acl, &unmatch_v4);
+ ret = acl_match(acl, &unmatch_v4, 0);
ok(ret == ACL_DENY, "acl: matching address without matching port");
// 13. Invalid parameters
lives_ok({
acl_delete(0);
- acl_create(0, 0, ACL_ERROR);
- acl_match(0, 0);
+ acl_create(0, 0, ACL_ERROR, 0);
+ acl_match(0, 0, 0);
acl_truncate(0);
acl_name(0);
}, "acl: won't crash with NULL parameters");