/*
- * Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
listen-on-v6 { none; };
recursion no;
geoip-directory "../data";
- geoip-use-ecs no;
+ geoip-use-ecs no;
};
key rndc_key {
}
#ifdef ISC_PLATFORM_USESIT
- obj = NULL;
- (void) cfg_map_get(options, "sit-secret", &obj);
- if (obj != NULL) {
- isc_buffer_t b;
+ obj = NULL;
+ (void) cfg_map_get(options, "sit-secret", &obj);
+ if (obj != NULL) {
+ isc_buffer_t b;
unsigned char secret[32];
- memset(secret, 0, sizeof(secret));
- isc_buffer_init(&b, secret, sizeof(secret));
- tresult = isc_hex_decodestring(cfg_obj_asstring(obj), &b);
- if (tresult == ISC_R_NOSPACE) {
+ memset(secret, 0, sizeof(secret));
+ isc_buffer_init(&b, secret, sizeof(secret));
+ tresult = isc_hex_decodestring(cfg_obj_asstring(obj), &b);
+ if (tresult == ISC_R_NOSPACE) {
cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
"sit-secret: too long");
} else if (tresult != ISC_R_SUCCESS) {
if (tresult != ISC_R_SUCCESS)
result = tresult;
#ifdef AES_SIT
- if (tresult == ISC_R_SUCCESS &&
+ if (tresult == ISC_R_SUCCESS &&
isc_buffer_usedlength(&b) != ISC_AES128_KEYLENGTH) {
cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
- "AES sit-secret must be on 128 bits");
+ "AES sit-secret must be on 128 bits");
result = ISC_R_RANGE;
}
#endif
#ifdef HMAC_SHA1_SIT
- if (tresult == ISC_R_SUCCESS &&
+ if (tresult == ISC_R_SUCCESS &&
isc_buffer_usedlength(&b) != ISC_SHA1_DIGESTLENGTH) {
cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
"SHA1 sit-secret must be on 160 bits");
}
#endif
#ifdef HMAC_SHA256_SIT
- if (tresult == ISC_R_SUCCESS &&
+ if (tresult == ISC_R_SUCCESS &&
isc_buffer_usedlength(&b) != ISC_SHA256_DIGESTLENGTH) {
cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
- "SHA256 sit-secret must be on 256 bits");
+ "SHA256 sit-secret must be on 256 bits");
result = ISC_R_RANGE;
}
#endif
- }
+ }
#endif
return (result);
isc_result_t
dns_acl_match2(const isc_netaddr_t *reqaddr,
const dns_name_t *reqsigner,
- const isc_netaddr_t *ecs,
+ const isc_netaddr_t *ecs,
isc_uint8_t ecslen,
isc_uint8_t *scope,
const dns_acl_t *acl,
isc_boolean_t
dns_aclelement_match2(const isc_netaddr_t *reqaddr,
const dns_name_t *reqsigner,
- const isc_netaddr_t *ecs,
+ const isc_netaddr_t *ecs,
isc_uint8_t ecslen,
isc_uint8_t *scope,
const dns_aclelement_t *e,
memcmp(prev_state->ipnum6.s6_addr, ipnum6->s6_addr, 16) == 0)))
{
text = prev_state->text;
- if (scope != NULL)
+ if (scope != NULL)
*scope = prev_state->scope;
}
memcmp(prev_state->ipnum6.s6_addr, ipnum6->s6_addr, 16) == 0)))
{
record = prev_state->record;
- if (scope != NULL)
+ if (scope != NULL)
*scope = record->netmask;
}
is_region(prev_state->subtype))
{
region = prev_state->region;
- if (scope != NULL)
+ if (scope != NULL)
*scope = prev_state->scope;
}
prev_state->subtype == subtype)
{
name = prev_state->name;
- if (scope != NULL)
+ if (scope != NULL)
*scope = prev_state->scope;
}
if (prev_state != NULL && prev_state->ipnum == ipnum &&
prev_state->subtype == subtype) {
id = prev_state->id;
- if (scope != NULL)
+ if (scope != NULL)
*scope = prev_state->scope;
found = ISC_TRUE;
}
isc_result_t
dns_acl_match2(const isc_netaddr_t *reqaddr,
const dns_name_t *reqsigner,
- const isc_netaddr_t *ecs,
+ const isc_netaddr_t *ecs,
isc_uint8_t ecslen,
isc_uint8_t *scope,
const dns_acl_t *acl,
isc_boolean_t
dns_aclelement_match2(const isc_netaddr_t *reqaddr,
const dns_name_t *reqsigner,
- const isc_netaddr_t *ecs,
+ const isc_netaddr_t *ecs,
isc_uint8_t ecslen,
isc_uint8_t *scope,
const dns_aclelement_t *e,
int next = ++radix->num_added_node;
if (fam == AF_UNSPEC) {
/* "any" or "none" */
- for (i = 0; i < 4; i++)
+ for (i = 0; i < 4; i++)
node->node_num[i] = next;
} else {
node->node_num[ISC_RADIX_OFF(prefix)] = next;
int next = ++radix->num_added_node;
if (fam == AF_UNSPEC) {
/* "any" or "none" */
- for (i = 0; i < 4; i++)
+ for (i = 0; i < 4; i++)
node->node_num[i] = next;
} else {
node->node_num[ISC_RADIX_OFF(prefix)] = next;
int next = ++radix->num_added_node;
if (fam == AF_UNSPEC) {
/* "any" or "none" */
- for (i = 0; i < 4; i++)
+ for (i = 0; i < 4; i++)
new_node->node_num[i] = next;
} else {
new_node->node_num[ISC_RADIX_OFF(prefix)] = next;