*/
static void
is_insecure(isc_prefix_t *prefix, void **data) {
- int bitlen, family, off;
-
- bitlen = prefix->bitlen;
- family = prefix->family;
-
- off = ISC_RADIX_OFF(prefix);
-fprintf(stderr, "%d %d %d %d %d %d %d\n",
- bitlen, family, off,
- data[0] ? (* (isc_boolean_t *) data[0]) : -1,
- data[1] ? (* (isc_boolean_t *) data[1]) : -1,
- data[2] ? (* (isc_boolean_t *) data[2]) : -1,
- data[3] ? (* (isc_boolean_t *) data[3]) : -1);
-
/*
* If all nonexistent or negative then this node is secure.
*/
* If a loopback address found and there is the other family
* doesn't exist or is negative, return.
*/
- if (bitlen == 32 &&
+ if (prefix->bitlen == 32 &&
htonl(prefix->add.sin.s_addr) == INADDR_LOOPBACK &&
(data[1] == NULL || !* (isc_boolean_t *) data[1]) &&
(data[3] == NULL || !* (isc_boolean_t *) data[3]))
return;
- if (bitlen == 128 &&
+ if (prefix->bitlen == 128 &&
IN6_IS_ADDR_LOOPBACK(&prefix->add.sin6) &&
(data[0] == NULL || !* (isc_boolean_t *) data[0]) &&
(data[2] == NULL || !* (isc_boolean_t *) data[2]))
result = dns_acl_merge(notany, any, ISC_FALSE);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-fprintf(stderr, "any\n");
ATF_CHECK(dns_acl_isinsecure(any)); /* any; */
-fprintf(stderr, "none\n");
ATF_CHECK(!dns_acl_isinsecure(none)); /* none; */
-fprintf(stderr, "!any\n");
ATF_CHECK(!dns_acl_isinsecure(notany)); /* !any; */
-fprintf(stderr, "!none\n");
ATF_CHECK(!dns_acl_isinsecure(notnone)); /* !none; */
dns_acl_detach(&any);
result = dns_acl_merge(notneg4neg6, neg4neg6, ISC_FALSE);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-fprintf(stderr, "pos4pos6\n");
ATF_CHECK(dns_acl_isinsecure(pos4pos6));
-fprintf(stderr, "notpos4pos6\n");
ATF_CHECK(!dns_acl_isinsecure(notpos4pos6));
-fprintf(stderr, "neg4pos6\n");
ATF_CHECK(dns_acl_isinsecure(neg4pos6));
-fprintf(stderr, "notneg4pos6\n");
ATF_CHECK(!dns_acl_isinsecure(notneg4pos6));
-fprintf(stderr, "pos4neg6\n");
ATF_CHECK(dns_acl_isinsecure(pos4neg6));
-fprintf(stderr, "notpos4neg6\n");
ATF_CHECK(!dns_acl_isinsecure(notpos4neg6));
-fprintf(stderr, "neg4neg6\n");
ATF_CHECK(!dns_acl_isinsecure(neg4neg6));
-fprintf(stderr, "notneg4neg6\n");
ATF_CHECK(!dns_acl_isinsecure(notneg4neg6));
dns_acl_detach(&pos4pos6);