Skip to content
Snippets Groups Projects
Commit d6337dfa authored by Marek Vavruša's avatar Marek Vavruša
Browse files

lib/iterate: another attempt

parent 3ec7c46d
No related branches found
No related tags found
No related merge requests found
......@@ -166,7 +166,7 @@ static int update_answer(const knot_rrset_t *rr, unsigned hint, struct kr_reques
{
/* Scrub DNSSEC records when not requested. */
knot_pkt_t *answer = req->answer;
if (answer->opt_rr && !knot_edns_do(answer->opt_rr)) {
if (!knot_pkt_has_dnssec(answer)) {
if (rr->type != knot_pkt_qtype(answer) && knot_rrtype_is_dnssec(rr->type)) {
return KNOT_STATE_DONE; /* Scrub */
}
......
......@@ -198,7 +198,7 @@ static int answer_finalize(struct kr_request *request, int state)
if (state == KNOT_STATE_DONE && !EMPTY_LIST(rplan->resolved)) {
struct kr_query *last = TAIL(rplan->resolved);
/* Do not set AD for RRSIG query, as we can't validate it. */
if ((last->flags & QUERY_DNSSEC_WANT) && knot_edns_do(answer->opt_rr) &&
if ((last->flags & QUERY_DNSSEC_WANT) && knot_pkt_has_dnssec(answer) &&
knot_pkt_qtype(answer) != KNOT_RRTYPE_RRSIG) {
knot_wire_set_ad(answer->wire);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment