mirror of https://github.com/getdnsapi/getdns.git
Schedule DNSSEC meta queries against existing context
This commit is contained in:
parent
362d168380
commit
e691312a3f
20
src/anchor.c
20
src/anchor.c
|
@ -1517,7 +1517,6 @@ void _getdns_start_fetching_ta(getdns_context *context, getdns_eventloop *loop)
|
||||||
char tas_hostname[256];
|
char tas_hostname[256];
|
||||||
const char *verify_CA;
|
const char *verify_CA;
|
||||||
const char *verify_email;
|
const char *verify_email;
|
||||||
getdns_context *sys_ctxt;
|
|
||||||
|
|
||||||
if ((r = _getdns_get_tas_url_hostname(context, tas_hostname, NULL))) {
|
if ((r = _getdns_get_tas_url_hostname(context, tas_hostname, NULL))) {
|
||||||
DEBUG_ANCHOR("ERROR %s(): Could not get_tas_url_hostname"
|
DEBUG_ANCHOR("ERROR %s(): Could not get_tas_url_hostname"
|
||||||
|
@ -1558,19 +1557,12 @@ void _getdns_start_fetching_ta(getdns_context *context, getdns_eventloop *loop)
|
||||||
DEBUG_ANCHOR("%s on the %ssynchronous loop\n", __FUNC__,
|
DEBUG_ANCHOR("%s on the %ssynchronous loop\n", __FUNC__,
|
||||||
loop == &context->sync_eventloop.loop ? "" : "a");
|
loop == &context->sync_eventloop.loop ? "" : "a");
|
||||||
|
|
||||||
if (!(sys_ctxt = _getdns_context_get_sys_ctxt(context, loop))) {
|
|
||||||
DEBUG_ANCHOR("Fatal error fetching trust anchor: "
|
|
||||||
"missing system context\n");
|
|
||||||
context->trust_anchors_source = GETDNS_TASRC_FAILED;
|
|
||||||
_getdns_ta_notify_dnsreqs(context);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
scheduled = 0;
|
scheduled = 0;
|
||||||
#if 1
|
#if 1
|
||||||
context->a.state = TAS_LOOKUP_ADDRESSES;
|
context->a.state = TAS_LOOKUP_ADDRESSES;
|
||||||
if ((r = _getdns_general_loop(sys_ctxt, loop,
|
if ((r = _getdns_general_loop(context, loop,
|
||||||
tas_hostname, GETDNS_RRTYPE_A, NULL, context,
|
tas_hostname, GETDNS_RRTYPE_A, no_dnssec_checking_disabled,
|
||||||
&context->a.req, NULL, _tas_hostname_lookup_cb))) {
|
context, &context->a.req, NULL, _tas_hostname_lookup_cb))) {
|
||||||
DEBUG_ANCHOR("Error scheduling A lookup for %s: %s\n"
|
DEBUG_ANCHOR("Error scheduling A lookup for %s: %s\n"
|
||||||
, tas_hostname, getdns_get_errorstr_by_id(r));
|
, tas_hostname, getdns_get_errorstr_by_id(r));
|
||||||
} else
|
} else
|
||||||
|
@ -1579,9 +1571,9 @@ void _getdns_start_fetching_ta(getdns_context *context, getdns_eventloop *loop)
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
context->aaaa.state = TAS_LOOKUP_ADDRESSES;
|
context->aaaa.state = TAS_LOOKUP_ADDRESSES;
|
||||||
if ((r = _getdns_general_loop(sys_ctxt, loop,
|
if ((r = _getdns_general_loop(context, loop,
|
||||||
tas_hostname, GETDNS_RRTYPE_AAAA, NULL, context,
|
tas_hostname, GETDNS_RRTYPE_AAAA, no_dnssec_checking_disabled,
|
||||||
&context->aaaa.req, NULL, _tas_hostname_lookup_cb))) {
|
context, &context->aaaa.req, NULL, _tas_hostname_lookup_cb))) {
|
||||||
DEBUG_ANCHOR("Error scheduling AAAA lookup for %s: %s\n"
|
DEBUG_ANCHOR("Error scheduling AAAA lookup for %s: %s\n"
|
||||||
, tas_hostname, getdns_get_errorstr_by_id(r));
|
, tas_hostname, getdns_get_errorstr_by_id(r));
|
||||||
} else
|
} else
|
||||||
|
|
|
@ -1733,7 +1733,6 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
if ((r = parse_args(argc, argv)) && r != CONTINUE)
|
if ((r = parse_args(argc, argv)) && r != CONTINUE)
|
||||||
goto done_destroy_context;
|
goto done_destroy_context;
|
||||||
fprintf(stderr, "resolvconf: %s\n", resolvconf);
|
|
||||||
if (resolvconf) {
|
if (resolvconf) {
|
||||||
if ((r = getdns_context_set_resolvconf(context, resolvconf))) {
|
if ((r = getdns_context_set_resolvconf(context, resolvconf))) {
|
||||||
fprintf(stderr, "Problem initializing with resolvconf: %d\n", (int)r);
|
fprintf(stderr, "Problem initializing with resolvconf: %d\n", (int)r);
|
||||||
|
|
Loading…
Reference in New Issue