}
return false;
}
-
- /* If this is a subquery, check overall resolution time for parent */
- if (!qry->parent) {
- return true;
- }
-
- while (qry->parent) {
- qry = qry->parent;
- }
-
- /* qry here is an oldest ancestor */
- resolving_time = time_diff(&qry->creation_time, now);
- if (resolving_time > KR_RESOLVE_TIME_LIMIT) {
- /* oldest ancestor is too old */
- WITH_VERBOSE {
- VERBOSE_MSG(qry, "query resolution time limit exceeded\n");
- }
- return false;
- }
return true;
}
qry->ns.ctx = rplan->request->ctx;
qry->ns.addr[0].ip.sa_family = AF_UNSPEC;
gettimeofday(&qry->timestamp, NULL);
- qry->creation_time = qry->timestamp;
+ qry->creation_time = parent ? parent->creation_time : qry->timestamp;
kr_zonecut_init(&qry->zone_cut, (const uint8_t *)"", rplan->pool);
qry->reorder = qry->flags.REORDER_RR
? knot_wire_get_id(rplan->request->answer->wire)
uint32_t secret;
uint16_t fails;
uint16_t reorder; /**< Seed to reorder (cached) RRs in answer or zero. */
- struct timeval creation_time;
+ struct timeval creation_time; /* The time of query's creation.
+ * Or time of creation of an oldest
+ * ancestor if it is a subquery. */
struct timeval timestamp;
struct kr_zonecut zone_cut;
struct kr_nsrep ns;