update copyright notice
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* 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
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ options {
|
|||||||
listen-on-v6 { none; };
|
listen-on-v6 { none; };
|
||||||
recursion no;
|
recursion no;
|
||||||
geoip-directory "../data";
|
geoip-directory "../data";
|
||||||
geoip-use-ecs no;
|
geoip-use-ecs no;
|
||||||
};
|
};
|
||||||
|
|
||||||
key rndc_key {
|
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
|
#ifdef ISC_PLATFORM_USESIT
|
||||||
obj = NULL;
|
obj = NULL;
|
||||||
(void) cfg_map_get(options, "sit-secret", &obj);
|
(void) cfg_map_get(options, "sit-secret", &obj);
|
||||||
if (obj != NULL) {
|
if (obj != NULL) {
|
||||||
isc_buffer_t b;
|
isc_buffer_t b;
|
||||||
unsigned char secret[32];
|
unsigned char secret[32];
|
||||||
|
|
||||||
memset(secret, 0, sizeof(secret));
|
memset(secret, 0, sizeof(secret));
|
||||||
isc_buffer_init(&b, secret, sizeof(secret));
|
isc_buffer_init(&b, secret, sizeof(secret));
|
||||||
tresult = isc_hex_decodestring(cfg_obj_asstring(obj), &b);
|
tresult = isc_hex_decodestring(cfg_obj_asstring(obj), &b);
|
||||||
if (tresult == ISC_R_NOSPACE) {
|
if (tresult == ISC_R_NOSPACE) {
|
||||||
cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
|
cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
|
||||||
"sit-secret: too long");
|
"sit-secret: too long");
|
||||||
} else if (tresult != ISC_R_SUCCESS) {
|
} 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)
|
if (tresult != ISC_R_SUCCESS)
|
||||||
result = tresult;
|
result = tresult;
|
||||||
#ifdef AES_SIT
|
#ifdef AES_SIT
|
||||||
if (tresult == ISC_R_SUCCESS &&
|
if (tresult == ISC_R_SUCCESS &&
|
||||||
isc_buffer_usedlength(&b) != ISC_AES128_KEYLENGTH) {
|
isc_buffer_usedlength(&b) != ISC_AES128_KEYLENGTH) {
|
||||||
cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
|
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;
|
result = ISC_R_RANGE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef HMAC_SHA1_SIT
|
#ifdef HMAC_SHA1_SIT
|
||||||
if (tresult == ISC_R_SUCCESS &&
|
if (tresult == ISC_R_SUCCESS &&
|
||||||
isc_buffer_usedlength(&b) != ISC_SHA1_DIGESTLENGTH) {
|
isc_buffer_usedlength(&b) != ISC_SHA1_DIGESTLENGTH) {
|
||||||
cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
|
cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
|
||||||
"SHA1 sit-secret must be on 160 bits");
|
"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
|
#endif
|
||||||
#ifdef HMAC_SHA256_SIT
|
#ifdef HMAC_SHA256_SIT
|
||||||
if (tresult == ISC_R_SUCCESS &&
|
if (tresult == ISC_R_SUCCESS &&
|
||||||
isc_buffer_usedlength(&b) != ISC_SHA256_DIGESTLENGTH) {
|
isc_buffer_usedlength(&b) != ISC_SHA256_DIGESTLENGTH) {
|
||||||
cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
|
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;
|
result = ISC_R_RANGE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return (result);
|
return (result);
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ dns_acl_match(const isc_netaddr_t *reqaddr,
|
|||||||
isc_result_t
|
isc_result_t
|
||||||
dns_acl_match2(const isc_netaddr_t *reqaddr,
|
dns_acl_match2(const isc_netaddr_t *reqaddr,
|
||||||
const dns_name_t *reqsigner,
|
const dns_name_t *reqsigner,
|
||||||
const isc_netaddr_t *ecs,
|
const isc_netaddr_t *ecs,
|
||||||
isc_uint8_t ecslen,
|
isc_uint8_t ecslen,
|
||||||
isc_uint8_t *scope,
|
isc_uint8_t *scope,
|
||||||
const dns_acl_t *acl,
|
const dns_acl_t *acl,
|
||||||
@@ -444,7 +444,7 @@ dns_aclelement_match(const isc_netaddr_t *reqaddr,
|
|||||||
isc_boolean_t
|
isc_boolean_t
|
||||||
dns_aclelement_match2(const isc_netaddr_t *reqaddr,
|
dns_aclelement_match2(const isc_netaddr_t *reqaddr,
|
||||||
const dns_name_t *reqsigner,
|
const dns_name_t *reqsigner,
|
||||||
const isc_netaddr_t *ecs,
|
const isc_netaddr_t *ecs,
|
||||||
isc_uint8_t ecslen,
|
isc_uint8_t ecslen,
|
||||||
isc_uint8_t *scope,
|
isc_uint8_t *scope,
|
||||||
const dns_aclelement_t *e,
|
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)))
|
memcmp(prev_state->ipnum6.s6_addr, ipnum6->s6_addr, 16) == 0)))
|
||||||
{
|
{
|
||||||
text = prev_state->text;
|
text = prev_state->text;
|
||||||
if (scope != NULL)
|
if (scope != NULL)
|
||||||
*scope = prev_state->scope;
|
*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)))
|
memcmp(prev_state->ipnum6.s6_addr, ipnum6->s6_addr, 16) == 0)))
|
||||||
{
|
{
|
||||||
record = prev_state->record;
|
record = prev_state->record;
|
||||||
if (scope != NULL)
|
if (scope != NULL)
|
||||||
*scope = record->netmask;
|
*scope = record->netmask;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -499,7 +499,7 @@ region_lookup(GeoIP *db, dns_geoip_subtype_t subtype,
|
|||||||
is_region(prev_state->subtype))
|
is_region(prev_state->subtype))
|
||||||
{
|
{
|
||||||
region = prev_state->region;
|
region = prev_state->region;
|
||||||
if (scope != NULL)
|
if (scope != NULL)
|
||||||
*scope = prev_state->scope;
|
*scope = prev_state->scope;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -539,7 +539,7 @@ name_lookup(GeoIP *db, dns_geoip_subtype_t subtype,
|
|||||||
prev_state->subtype == subtype)
|
prev_state->subtype == subtype)
|
||||||
{
|
{
|
||||||
name = prev_state->name;
|
name = prev_state->name;
|
||||||
if (scope != NULL)
|
if (scope != NULL)
|
||||||
*scope = prev_state->scope;
|
*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 &&
|
if (prev_state != NULL && prev_state->ipnum == ipnum &&
|
||||||
prev_state->subtype == subtype) {
|
prev_state->subtype == subtype) {
|
||||||
id = prev_state->id;
|
id = prev_state->id;
|
||||||
if (scope != NULL)
|
if (scope != NULL)
|
||||||
*scope = prev_state->scope;
|
*scope = prev_state->scope;
|
||||||
found = ISC_TRUE;
|
found = ISC_TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ dns_acl_match(const isc_netaddr_t *reqaddr,
|
|||||||
isc_result_t
|
isc_result_t
|
||||||
dns_acl_match2(const isc_netaddr_t *reqaddr,
|
dns_acl_match2(const isc_netaddr_t *reqaddr,
|
||||||
const dns_name_t *reqsigner,
|
const dns_name_t *reqsigner,
|
||||||
const isc_netaddr_t *ecs,
|
const isc_netaddr_t *ecs,
|
||||||
isc_uint8_t ecslen,
|
isc_uint8_t ecslen,
|
||||||
isc_uint8_t *scope,
|
isc_uint8_t *scope,
|
||||||
const dns_acl_t *acl,
|
const dns_acl_t *acl,
|
||||||
@@ -265,7 +265,7 @@ dns_aclelement_match(const isc_netaddr_t *reqaddr,
|
|||||||
isc_boolean_t
|
isc_boolean_t
|
||||||
dns_aclelement_match2(const isc_netaddr_t *reqaddr,
|
dns_aclelement_match2(const isc_netaddr_t *reqaddr,
|
||||||
const dns_name_t *reqsigner,
|
const dns_name_t *reqsigner,
|
||||||
const isc_netaddr_t *ecs,
|
const isc_netaddr_t *ecs,
|
||||||
isc_uint8_t ecslen,
|
isc_uint8_t ecslen,
|
||||||
isc_uint8_t *scope,
|
isc_uint8_t *scope,
|
||||||
const dns_aclelement_t *e,
|
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;
|
int next = ++radix->num_added_node;
|
||||||
if (fam == AF_UNSPEC) {
|
if (fam == AF_UNSPEC) {
|
||||||
/* "any" or "none" */
|
/* "any" or "none" */
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
node->node_num[i] = next;
|
node->node_num[i] = next;
|
||||||
} else {
|
} else {
|
||||||
node->node_num[ISC_RADIX_OFF(prefix)] = next;
|
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;
|
int next = ++radix->num_added_node;
|
||||||
if (fam == AF_UNSPEC) {
|
if (fam == AF_UNSPEC) {
|
||||||
/* "any" or "none" */
|
/* "any" or "none" */
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
node->node_num[i] = next;
|
node->node_num[i] = next;
|
||||||
} else {
|
} else {
|
||||||
node->node_num[ISC_RADIX_OFF(prefix)] = next;
|
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;
|
int next = ++radix->num_added_node;
|
||||||
if (fam == AF_UNSPEC) {
|
if (fam == AF_UNSPEC) {
|
||||||
/* "any" or "none" */
|
/* "any" or "none" */
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
new_node->node_num[i] = next;
|
new_node->node_num[i] = next;
|
||||||
} else {
|
} else {
|
||||||
new_node->node_num[ISC_RADIX_OFF(prefix)] = next;
|
new_node->node_num[ISC_RADIX_OFF(prefix)] = next;
|
||||||
|
|||||||
Reference in New Issue
Block a user