From: Vladimír Čunát Date: Wed, 20 Sep 2017 08:45:39 +0000 (+0200) Subject: validate: improve verbose messages X-Git-Tag: v1.4.0~2^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47f921561e1d772bda0783af0f211a3ea7aebb94;p=thirdparty%2Fknot-resolver.git validate: improve verbose messages Next time it will be directly visible what record fails to validate, which was the most time-expensive part when creating the parent commit. --- diff --git a/lib/layer/validate.c b/lib/layer/validate.c index b35e27087..8b188e0e7 100644 --- a/lib/layer/validate.c +++ b/lib/layer/validate.c @@ -444,7 +444,6 @@ static int rrsig_not_found(kr_layer_t *ctx, const knot_rrset_t *rr) struct kr_request *req = ctx->req; struct kr_query *qry = req->current_query; - VERBOSE_MSG(qry, ">< no valid RRSIGs found\n"); struct kr_zonecut *cut = &qry->zone_cut; const knot_dname_t *cut_name_start = qry->zone_cut.name; bool use_cut = true; @@ -537,6 +536,11 @@ static int check_validation_result(kr_layer_t *ctx, ranked_rr_array_t *arr) VERBOSE_MSG(qry, ">< cut changed (new signer), needs revalidation\n"); ret = KR_STATE_YIELD; } else if (kr_rank_test(invalid_entry->rank, KR_RANK_MISSING)) { + WITH_VERBOSE { + VERBOSE_MSG(qry, ">< no valid RRSIGs found for "); + kr_rrtype_print(invalid_entry->rr->type, "", " "); + kr_dname_print(invalid_entry->rr->owner, "", "\n"); + } ret = rrsig_not_found(ctx, rr); } else if (!kr_rank_test(invalid_entry->rank, KR_RANK_SECURE)) { qry->flags.DNSSEC_BOGUS = true;