if (knot_wire_get_tc(pkt->wire)) {
return ctx->state;
}
+ int unauth_cnt = 0;
+ bool needs_pkt = false;
+ if (qry->flags.STUB) {
+ needs_pkt = true;
+ goto stash_packet;
+ }
+
/* Stash individual records. */
ranked_rr_array_t *selected[] = kr_request_selected(req);
- int unauth_cnt = 0;
trie_t *nsec_pmap = trie_create(&req->pool);
if (!nsec_pmap) {
assert(!ENOMEM);
goto finally;
}
- bool needs_pkt = false;
- /* ^^ DNSSEC_OPTOUT is not fired in cases like `com. A`,
- * but currently we don't stash separate NSEC3 proving that. */
for (int psec = KNOT_ANSWER; psec <= KNOT_ADDITIONAL; ++psec) {
ranked_rr_array_t *arr = selected[psec];
/* uncached entries are located at the end */
trie_it_free(it);
/* LATER(optim.): typically we also have corresponding NS record in the list,
* so we might save a cache operation. */
-
+stash_packet:
if (qry->flags.PKT_IS_SANE && check_dname_for_lf(knot_pkt_qname(pkt), qry)) {
stash_pkt(pkt, qry, req, needs_pkt);
}