Commit 3278ff81 authored by Tinderbox User's avatar Tinderbox User
Browse files

update copyright notice

parent 25c5d8e8
/*
* 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
......
......@@ -28,7 +28,7 @@ options {
listen-on-v6 { none; };
recursion no;
geoip-directory "../data";
geoip-use-ecs no;
geoip-use-ecs no;
};
key rndc_key {
......
......@@ -1201,16 +1201,16 @@ check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx,
}
#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) {
......@@ -1220,15 +1220,15 @@ check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx,
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");
......@@ -1236,14 +1236,14 @@ check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx,
}
#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);
......
......@@ -199,7 +199,7 @@ dns_acl_match(const isc_netaddr_t *reqaddr,
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,
......@@ -444,7 +444,7 @@ dns_aclelement_match(const isc_netaddr_t *reqaddr,
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,
......
......@@ -259,7 +259,7 @@ country_lookup(GeoIP *db, dns_geoip_subtype_t subtype,
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;
}
......@@ -418,7 +418,7 @@ city_lookup(GeoIP *db, dns_geoip_subtype_t subtype,
memcmp(prev_state->ipnum6.s6_addr, ipnum6->s6_addr, 16) == 0)))
{
record = prev_state->record;
if (scope != NULL)
if (scope != NULL)
*scope = record->netmask;
}
......@@ -499,7 +499,7 @@ region_lookup(GeoIP *db, dns_geoip_subtype_t subtype,
is_region(prev_state->subtype))
{
region = prev_state->region;
if (scope != NULL)
if (scope != NULL)
*scope = prev_state->scope;
}
......@@ -539,7 +539,7 @@ name_lookup(GeoIP *db, dns_geoip_subtype_t subtype,
prev_state->subtype == subtype)
{
name = prev_state->name;
if (scope != NULL)
if (scope != NULL)
*scope = prev_state->scope;
}
......@@ -579,7 +579,7 @@ netspeed_lookup(GeoIP *db, dns_geoip_subtype_t subtype,
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;
}
......
......@@ -217,7 +217,7 @@ dns_acl_match(const isc_netaddr_t *reqaddr,
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,
......@@ -265,7 +265,7 @@ dns_aclelement_match(const isc_netaddr_t *reqaddr,
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,
......
......@@ -361,7 +361,7 @@ isc_radix_insert(isc_radix_tree_t *radix, isc_radix_node_t **target,
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;
......@@ -484,7 +484,7 @@ isc_radix_insert(isc_radix_tree_t *radix, isc_radix_node_t **target,
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;
......@@ -535,7 +535,7 @@ isc_radix_insert(isc_radix_tree_t *radix, isc_radix_node_t **target,
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment