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

lib/rrcache: break caching if target already exists (catches loops)

parent c8b02e9c
Branches
Tags
No related merge requests found
......@@ -174,7 +174,10 @@ static int write_cache_rr(const knot_pktsection_t *section, knot_rrset_t *rr, na
/* Follow the chain */
rr->owner = (knot_dname_t *)knot_ns_name(&rr->rrs, 0);
knot_rdataset_clear(&rr->rrs, pool);
/* Check if target already cached. */
if (kr_cache_peek_rr(txn, rr, &timestamp) == KNOT_EOK) {
break;
}
}
/* Now there may be a terminal record. */
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment