Lines Matching full:now

61  * @param now: current time.
72 * earlier than the time in now. The time is used to determine if RRsets
78 store_rrsets(struct module_env* env, struct reply_info* rep, time_t now, in store_rrsets() argument
91 LDNS_RR_TYPE_NS && !pside)?qstarttime:now) + leeway)) { in store_rrsets()
103 rep->ref[i].key, region, now); in store_rrsets()
172 reply_info_set_ttls(rep, *env->now); in dns_cache_store_msg()
173 store_rrsets(env, rep, *env->now, leeway, pside, qrep, region, in dns_cache_store_msg()
209 uint16_t qclass, time_t now, uint16_t searchtype, int stripfront, in find_closest_of_type() argument
225 qnamelen, searchtype, qclass, 0, now, 0))) { in find_closest_of_type()
244 &qnamelen, searchtype, qclass, now, expiretop, in find_closest_of_type()
252 searchtype, qclass, 0, now, 0))) { in find_closest_of_type()
271 struct dns_msg* msg, time_t now) in addr_to_additional() argument
274 packed_rrset_copy_region(rrset, region, now))) { in addr_to_additional()
283 uint16_t qtype, uint16_t qclass, uint16_t flags, time_t now, int wr) in msg_cache_lookup() argument
298 if( now > ((struct reply_info*)e->data)->ttl ) { in msg_cache_lookup()
308 struct regional* region, struct delegpt* dp, time_t now, in find_add_addrs() argument
316 ns->namelen, LDNS_RR_TYPE_A, qclass, 0, now, 0); in find_add_addrs()
323 addr_to_additional(akey, region, *msg, now); in find_add_addrs()
329 LDNS_RR_TYPE_A, qclass, 0, now, 0); in find_add_addrs()
336 ns->namelen, LDNS_RR_TYPE_AAAA, qclass, 0, now, 0); in find_add_addrs()
343 addr_to_additional(akey, region, *msg, now); in find_add_addrs()
349 LDNS_RR_TYPE_AAAA, qclass, 0, now, 0); in find_add_addrs()
356 LDNS_RR_TYPE_AAAA, qclass, BIT_CD, now, 0); in find_add_addrs()
374 time_t now = *env->now; in cache_fill_missing() local
380 ns->namelen, LDNS_RR_TYPE_A, qclass, flags, now, 0); in cache_fill_missing()
394 LDNS_RR_TYPE_A, qclass, 0, now, 0); in cache_fill_missing()
401 ns->namelen, LDNS_RR_TYPE_AAAA, qclass, flags, now, 0); in cache_fill_missing()
415 LDNS_RR_TYPE_AAAA, qclass, 0, now, 0); in cache_fill_missing()
422 LDNS_RR_TYPE_AAAA, qclass, BIT_CD, now, 0); in cache_fill_missing()
435 struct dns_msg* msg, struct delegpt* dp, time_t now) in find_add_ds() argument
440 msg->qinfo.qclass, 0, now, 0); in find_add_ds()
446 0, now, 0); in find_add_ds()
458 packed_rrset_copy_region(rrset, region, now))) { in find_add_ds()
501 struct ub_packed_rrset_key* rrset, time_t now) in dns_msg_authadd() argument
504 packed_rrset_copy_region(rrset, region, now))) in dns_msg_authadd()
512 struct ub_packed_rrset_key* rrset, time_t now) in dns_msg_ansadd() argument
515 packed_rrset_copy_region(rrset, region, now))) in dns_msg_ansadd()
524 struct regional* region, struct dns_msg** msg, time_t now, in dns_cache_find_delegation() argument
532 nskey = find_closest_of_type(env, qname, qnamelen, qclass, now, in dns_cache_find_delegation()
553 if(!*msg || !dns_msg_authadd(*msg, region, nskey, now)) { in dns_cache_find_delegation()
564 find_add_ds(env, region, *msg, dp, now); in dns_cache_find_delegation()
566 if(!find_add_addrs(env, qclass, region, dp, now, msg)) in dns_cache_find_delegation()
602 struct regional* region, time_t now, int allow_expired, in tomsg() argument
608 time_t now_control = now; in tomsg()
609 if(now > r->ttl) { in tomsg()
611 if(!allow_expired || !reply_info_can_answer_expired(r, now)) in tomsg()
625 :r->ttl - now; in tomsg()
626 if(r->prefetch_ttl > now) in tomsg()
627 msg->rep->prefetch_ttl = r->prefetch_ttl - now; in tomsg()
649 /* cname chain is now invalid, reconstruct msg */ in tomsg()
660 region, now); in tomsg()
699 time_t now, struct query_info* q) in rrset_msg() argument
704 if(now > d->ttl) in rrset_msg()
712 msg->rep->ttl = d->ttl - now; in rrset_msg()
722 msg->rep->rrsets[0] = packed_rrset_copy_region(rrset, region, now); in rrset_msg()
731 time_t now, struct query_info* q, enum sec_status* sec_status) in synth_dname_msg() argument
739 if(now > d->ttl) in synth_dname_msg()
752 msg->rep->ttl = d->ttl - now; in synth_dname_msg()
762 msg->rep->rrsets[0] = packed_rrset_copy_region(rrset, region, now); in synth_dname_msg()
804 newd->ttl = d->ttl - now; /* RFC6672: synth CNAME TTL == DNAME TTL */ in synth_dname_msg()
829 time_t now = *env->now; in fill_any() local
854 qclass, 0, now, 0); in fill_any()
880 if(!dns_msg_ansadd(msg, region, rrset, now)) { in fill_any()
898 time_t now = *env->now; in dns_cache_lookup() local
912 struct dns_msg* msg = tomsg(env, &key->key, data, region, now, 0, in dns_cache_lookup()
926 (rrset=find_closest_of_type(env, qname, qnamelen, qclass, now, in dns_cache_lookup()
930 struct dns_msg* msg = synth_dname_msg(rrset, region, now, &k, in dns_cache_lookup()
935 /* now, after unlocking the DNAME rrset lock, in dns_cache_lookup()
949 LDNS_RR_TYPE_CNAME, qclass, 0, now, 0); in dns_cache_lookup()
966 LDNS_RR_TYPE_CNAME, qclass, 0, now, 0))) { in dns_cache_lookup()
973 struct dns_msg* msg = rrset_msg(rrset, region, now, &k); in dns_cache_lookup()
985 qtype, qclass, 0, now, 0))) { in dns_cache_lookup()
1000 struct dns_msg* msg = rrset_msg(rrset, region, now, &k); in dns_cache_lookup()
1034 && (msg=tomsg(env, &k, data, region, now, 0, scratch))) { in dns_cache_lookup()
1071 if(cached->ttl < *env->now in dns_cache_store()
1072 && reply_info_could_use_expired(cached, *env->now) in dns_cache_store()
1097 * the env->now is added to message and RRsets in this routine. */ in dns_cache_store()
1105 rep->rrsets[i]->entry.data, *env->now); in dns_cache_store()
1113 && !pside) ? qstarttime:*env->now + leeway)); in dns_cache_store()
1149 qinfo->qtype, qinfo->qclass, flags, *env->now, 1); in dns_cache_prefetch_adjust()