Setup libunbound ta's after processing XML

This commit is contained in:
Willem Toorop 2017-09-18 09:59:22 +02:00
parent 463855d274
commit 737f49d2cc
2 changed files with 7 additions and 5 deletions

View File

@ -803,6 +803,7 @@ void _getdns_context_equip_with_anchor(
context->trust_anchors = ta;
context->trust_anchors_len = ta_len;
context->trust_anchors_source = GETDNS_TASRC_XML;
_getdns_ta_notify_dnsreqs(context);
}
} else
DEBUG_ANCHOR("Could not allocate space for XML file");
@ -811,6 +812,7 @@ void _getdns_context_equip_with_anchor(
context->trust_anchors = context->trust_anchors_spc;
context->trust_anchors_len = ta_len;
context->trust_anchors_source = GETDNS_TASRC_XML;
_getdns_ta_notify_dnsreqs(context);
}
DEBUG_ANCHOR("ta: %p, ta_len: %d\n",
(void *)context->trust_anchors, (int)context->trust_anchors_len);

View File

@ -571,11 +571,6 @@ getdns_general_ns(getdns_context *context, getdns_eventloop *loop,
if (extensions && (r = validate_extensions(extensions)))
return r;
/* Set up the context assuming we won't use the specified namespaces.
This is (currently) identical to setting up a pure DNS namespace */
if ((r = _getdns_context_prepare_for_resolution(context, 0)))
return r;
/* create the request */
if (!(req = _getdns_dns_req_new(
context, loop, name, request_type, extensions, &now_ms)))
@ -592,6 +587,11 @@ getdns_general_ns(getdns_context *context, getdns_eventloop *loop,
if (context->trust_anchors_source == GETDNS_TASRC_NONE)
_getdns_start_fetching_ta(context, loop);
}
/* Set up the context assuming we won't use the specified namespaces.
This is (currently) identical to setting up a pure DNS namespace */
if ((r = _getdns_context_prepare_for_resolution(context, 0)))
return r;
if (return_netreq_p)
*return_netreq_p = req->netreqs[0];