kresd/cache/zonecut.cについて、ここに記述してください。

$ grep kr_cache_ zonecut.c

static void fetch_addr(struct kr_zonecut *cut, const knot_dname_t *ns, uint16_t rrtype, struct kr_cache_txn *txn, uint32_t timestamp)
        if (kr_cache_peek_rr(txn, &cached_rr, &rank, NULL, &timestamp) != 0) {

static int fetch_ns(struct kr_context *ctx, struct kr_zonecut *cut, const knot_dname_t *name, struct kr_cache_txn *txn, uint32_t timestamp, uint8_t * restrict rank)
        int ret = kr_cache_peek_rr(txn, &cached_rr, rank, NULL, &drift);
                       struct kr_cache_txn *txn, knot_mm_t *pool, uint32_t timestamp)
        int ret = kr_cache_peek_rr(txn, &cached_rr, &rank, NULL, &drift);
        ret = kr_cache_materialize(*rr, &cached_rr, drift, pool);

static int fetch_ta(struct kr_zonecut *cut, const knot_dname_t *name, struct kr_cache_txn *txn, uint32_t timestamp)
static int fetch_dnskey(struct kr_zonecut *cut, const knot_dname_t *name, struct kr_cache_txn *txn, uint32_t timestamp)
                           struct kr_cache_txn *txn, uint32_t timestamp, bool * restrict secured)

rrcacheを使うのであれば、glueは返答には使わないようなrankにすべきだ。 -- ToshinoriMaeno 2016-04-24 01:45:04

それでも不十分だ。特定のzoneのためのglueを別zoneのためのglueに使ってはいけないから。

-- ToshinoriMaeno 2016-04-24 02:09:59

~/kresd/lib$ grep kr_zonecut resolve.c
                return kr_zonecut_del(&qry->zone_cut, qry->ns.name, rdata_arr);
                return kr_zonecut_del(&qry->zone_cut, qry->ns.name, NULL);
                        ret = kr_zonecut_find_cached(req->ctx, &qry->zone_cut, encloser, &txn, qry->timestamp.tv_sec, &secured);
                        ret = kr_zonecut_find_cached(req->ctx, &qry->zone_cut, qry->sname, &txn, qry->timestamp.tv_sec, &secured);
                        kr_zonecut_set_sbelt(ctx, &qry->zone_cut);
                ret = kr_zonecut_set_sbelt(ctx, &next->zone_cut);
                        kr_zonecut_copy_trust(&next->zone_cut, &qry->zone_cut);
                        kr_zonecut_set_sbelt(ctx, &qry->zone_cut); /* Add SBELT to parent in case query fails. */
        kr_zonecut_set(&next->zone_cut, parent->zone_cut.name);
        if (kr_zonecut_copy(&next->zone_cut, &parent->zone_cut) != 0 ||
            kr_zonecut_copy_trust(&next->zone_cut, &parent->zone_cut) != 0) {
                                ret = kr_zonecut_set_sbelt(request->ctx, &qry->zone_cut);
                        kr_zonecut_set_sbelt(request->ctx, &qry->zone_cut);

~/kresd/lib/layer$ grep kr_zonecut *.c

iterate.c:              int ret = kr_zonecut_add(&query->zone_cut, rr->owner, rdata);
iterate.c:      struct kr_zonecut *cut = &qry->zone_cut;
iterate.c:              struct kr_zonecut *parent = mm_alloc(&req->pool, sizeof(*parent));
iterate.c:                      kr_zonecut_init(cut, rr->owner, &req->pool);
iterate.c:                      kr_zonecut_set(cut, rr->owner);
iterate.c:              kr_zonecut_add(cut, ns_name, NULL);
iterate.c:      struct kr_zonecut *cut = &qry->zone_cut;
validate.c:static knot_rrset_t *update_ds(struct kr_zonecut *cut, const knot_pktsection_t *sec)
validate.c:     struct kr_zonecut *cut = &qry->zone_cut;