Upgrade unbound library
These files were pulled from the 1.6.3 release tarball. This new version builds against OpenSSL version 1.1 which will be the default in the new Debian Stable which is due to be released RealSoonNow (tm).
This commit is contained in:
14
external/unbound/validator/autotrust.c
vendored
14
external/unbound/validator/autotrust.c
vendored
@@ -430,6 +430,8 @@ find_add_tp(struct val_anchors* anchors, uint8_t* rr, size_t rr_len,
|
||||
}
|
||||
tp = autr_tp_create(anchors, rr, dname_len, sldns_wirerr_get_class(rr,
|
||||
rr_len, dname_len));
|
||||
if(!tp)
|
||||
return NULL;
|
||||
lock_basic_lock(&tp->lock);
|
||||
return tp;
|
||||
}
|
||||
@@ -1062,7 +1064,7 @@ int autr_read_file(struct val_anchors* anchors, const char* nm)
|
||||
|
||||
/** string for a trustanchor state */
|
||||
static const char*
|
||||
trustanchor_state2str(autr_state_t s)
|
||||
trustanchor_state2str(autr_state_type s)
|
||||
{
|
||||
switch (s) {
|
||||
case AUTR_STATE_START: return " START ";
|
||||
@@ -1201,7 +1203,7 @@ void autr_write_file(struct module_env* env, struct trust_anchor* tp)
|
||||
if(fsync(fileno(out)) != 0)
|
||||
log_err("could not fsync(%s): %s", fname, strerror(errno));
|
||||
#else
|
||||
FlushFileBuffers((HANDLE)_fileno(out));
|
||||
FlushFileBuffers((HANDLE)_get_osfhandle(_fileno(out)));
|
||||
#endif
|
||||
if(fclose(out) != 0) {
|
||||
fatal_exit("could not complete write: %s: %s",
|
||||
@@ -1677,7 +1679,7 @@ reset_holddown(struct module_env* env, struct autr_ta* ta, int* changed)
|
||||
/** Set the state for this trust anchor */
|
||||
static void
|
||||
set_trustanchor_state(struct module_env* env, struct autr_ta* ta, int* changed,
|
||||
autr_state_t s)
|
||||
autr_state_type s)
|
||||
{
|
||||
verbose_key(ta, VERB_ALGO, "update: %s to %s",
|
||||
trustanchor_state2str(ta->s), trustanchor_state2str(s));
|
||||
@@ -1987,7 +1989,7 @@ calc_next_probe(struct module_env* env, time_t wait)
|
||||
static time_t
|
||||
wait_probe_time(struct val_anchors* anchors)
|
||||
{
|
||||
rbnode_t* t = rbtree_first(&anchors->autr->probe);
|
||||
rbnode_type* t = rbtree_first(&anchors->autr->probe);
|
||||
if(t != RBTREE_NULL)
|
||||
return ((struct trust_anchor*)t->key)->autr->next_probe_time;
|
||||
return 0;
|
||||
@@ -2326,6 +2328,7 @@ probe_anchor(struct module_env* env, struct trust_anchor* tp)
|
||||
qinfo.qname_len = tp->namelen;
|
||||
qinfo.qtype = LDNS_RR_TYPE_DNSKEY;
|
||||
qinfo.qclass = tp->dclass;
|
||||
qinfo.local_alias = NULL;
|
||||
log_query_info(VERB_ALGO, "autotrust probe", &qinfo);
|
||||
verbose(VERB_ALGO, "retry probe set in %d seconds",
|
||||
(int)tp->autr->next_probe_time - (int)*env->now);
|
||||
@@ -2333,6 +2336,7 @@ probe_anchor(struct module_env* env, struct trust_anchor* tp)
|
||||
edns.ext_rcode = 0;
|
||||
edns.edns_version = 0;
|
||||
edns.bits = EDNS_DO;
|
||||
edns.opt_list = NULL;
|
||||
if(sldns_buffer_capacity(buf) < 65535)
|
||||
edns.udp_size = (uint16_t)sldns_buffer_capacity(buf);
|
||||
else edns.udp_size = 65535;
|
||||
@@ -2359,7 +2363,7 @@ static struct trust_anchor*
|
||||
todo_probe(struct module_env* env, time_t* next)
|
||||
{
|
||||
struct trust_anchor* tp;
|
||||
rbnode_t* el;
|
||||
rbnode_type* el;
|
||||
/* get first one */
|
||||
lock_basic_lock(&env->anchors->lock);
|
||||
if( (el=rbtree_first(&env->anchors->autr->probe)) == RBTREE_NULL) {
|
||||
|
||||
Reference in New Issue
Block a user