Lines Matching refs:rdataset

55 #include <dns/rdataset.h>
475 dns_rdatatype_t type, dns_rdataset_t *rdataset,
493 result = dns_validator_create(fctx->res->view, name, type, rdataset,
510 rrsig_fromchildzone(fetchctx_t *fctx, dns_rdataset_t *rdataset) {
518 for (result = dns_rdataset_first(rdataset);
520 result = dns_rdataset_next(rdataset)) {
521 dns_rdataset_current(rdataset, &rdata);
537 dns_rdataset_t *rdataset;
588 for (rdataset = ISC_LIST_HEAD(name->list);
589 rdataset != NULL;
590 rdataset = ISC_LIST_NEXT(rdataset, link)) {
593 type = rdataset->type;
598 rrsig_fromchildzone(fctx, rdataset))
639 for (rdataset = ISC_LIST_HEAD(name->list);
640 rdataset != NULL;
641 rdataset = ISC_LIST_NEXT(rdataset, link)) {
642 type = rdataset->type;
653 if (rrsig_fromchildzone(fctx, rdataset))
1058 dns_rdataset_isassociated(event->rdataset) ||
1066 if (dns_rdataset_isassociated(event->rdataset) &&
1067 NEGATIVE(event->rdataset)) {
1264 dns_rdataset_t *rdataset = NULL;
1267 result = dns_message_buildopt(message, &rdataset, version, udpsize,
1271 return (dns_message_setopt(message, rdataset));
3449 dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset,
3475 event->rdataset = rdataset;
3784 dns_rdataset_t *rdataset;
3801 for (rdataset = ISC_LIST_HEAD(name->list);
3802 rdataset != NULL;
3803 rdataset = ISC_LIST_NEXT(rdataset, link)) {
3807 if (rdataset->type != dns_rdatatype_ns)
3844 dns_rdataset_t *rdataset;
3861 rdataset = ISC_LIST_HEAD(name->list);
3862 INSIST(rdataset != NULL);
3863 INSIST(ISC_LIST_NEXT(rdataset, link) == NULL);
3864 if (fctx->type != rdataset->type ||
3865 fctx->res->rdclass != rdataset->rdclass ||
3903 INSIST(hevent->rdataset != NULL);
3904 INSIST(event->rdataset != NULL);
3905 if (dns_rdataset_isassociated(hevent->rdataset))
3906 dns_rdataset_clone(hevent->rdataset, event->rdataset);
3982 dns_rdataset_t *rdataset;
4022 negative = ISC_TF(vevent->rdataset == NULL);
4049 vevent->rdataset != NULL &&
4050 CHAINING(vevent->rdataset))
4052 if (vevent->rdataset->type == dns_rdatatype_cname)
4055 INSIST(vevent->rdataset->type == dns_rdatatype_dname);
4079 ardataset = hevent->rdataset;
4091 if (vevent->rdataset != NULL)
4113 if (vevent->rdataset != NULL)
4120 vevent->rdataset, 0,
4201 result = dns_rdataset_addnoqname(vevent->rdataset,
4205 vevent->sigrdataset->ttl = vevent->rdataset->ttl;
4207 result = dns_rdataset_addclosest(vevent->rdataset,
4211 } else if (vevent->rdataset->trust == dns_trust_answer &&
4212 vevent->rdataset->type != dns_rdatatype_rrsig)
4217 vevent->rdataset->type, &noqname);
4219 tresult = dns_rdataset_addnoqname(vevent->rdataset,
4236 vevent->rdataset, 0, ardataset);
4294 for (rdataset = ISC_LIST_HEAD(name->list);
4295 rdataset != NULL;
4296 rdataset = ISC_LIST_NEXT(rdataset, link)) {
4297 if ((rdataset->type != dns_rdatatype_ns &&
4298 rdataset->type != dns_rdatatype_nsec) ||
4299 rdataset->trust != dns_trust_secure)
4305 sigrdataset->covers != rdataset->type)
4318 now, rdataset, 0, NULL);
4401 * Find the SIG for this rdataset, if we have it.
4510 dns_rdataset_t *rdataset, *sigrdataset;
4585 ardataset = event->rdataset;
4600 * Cache or validate each cacheable rdataset.
4603 for (rdataset = ISC_LIST_HEAD(name->list);
4604 rdataset != NULL;
4605 rdataset = ISC_LIST_NEXT(rdataset, link)) {
4606 if (!CACHE(rdataset))
4608 if (CHECKNAMES(rdataset)) {
4614 dns_rdatatype_format(rdataset->type, typebuf,
4616 dns_rdataclass_format(rdataset->rdclass, classbuf,
4624 if (ANSWER(rdataset)) {
4635 if (rdataset->ttl > res->view->maxcachettl)
4636 rdataset->ttl = res->view->maxcachettl;
4639 * Find the SIG for this rdataset, if we have it.
4645 sigrdataset->covers == rdataset->type)
4659 if (secure_domain && rdataset->trust != dns_trust_glue &&
4660 !EXTERNAL(rdataset)) {
4667 if (rdataset->type == dns_rdatatype_rrsig)
4671 if (!ANSWER(rdataset) && need_validation) {
4681 * Normalize the rdataset and sigrdataset TTLs.
4684 rdataset->ttl = ISC_MIN(rdataset->ttl,
4686 sigrdataset->ttl = rdataset->ttl;
4690 * Cache this rdataset/sigrdataset pair as
4694 if (rdataset->trust == dns_trust_additional)
4699 rdataset->trust = trust;
4702 if (!need_validation || !ANSWER(rdataset)) {
4703 if (ANSWER(rdataset) &&
4704 rdataset->type != dns_rdatatype_rrsig) {
4708 rdataset->type,
4714 rdataset, noqname);
4721 NULL, now, rdataset,
4762 } else if (!ANSWER(rdataset))
4766 if (ANSWER(rdataset) && need_validation) {
4778 valrdataset = rdataset;
4792 name, rdataset->type,
4793 rdataset,
4804 } else if (CHAINING(rdataset)) {
4805 if (rdataset->type == dns_rdatatype_cname)
4808 INSIST(rdataset->type ==
4813 } else if (!EXTERNAL(rdataset)) {
4815 * It's OK to cache this rdataset now.
4817 if (ANSWER(rdataset))
4819 else if (ANSWERSIG(rdataset))
4823 if (CHAINING(rdataset)) {
4824 if (rdataset->type == dns_rdatatype_cname)
4827 INSIST(rdataset->type ==
4832 if (rdataset->trust == dns_trust_glue &&
4833 (rdataset->type == dns_rdatatype_ns ||
4834 (rdataset->type == dns_rdatatype_rrsig &&
4835 rdataset->covers == dns_rdatatype_ns))) {
4847 if (ANSWER(rdataset) &&
4848 rdataset->type != dns_rdatatype_rrsig) {
4852 rdataset->type, &noqname);
4856 rdataset, noqname);
4862 * Now we can add the rdataset.
4866 rdataset,
4871 if (ANSWER(rdataset) &&
4902 if (dns_rdataset_isassociated(event->rdataset) &&
4903 NEGATIVE(event->rdataset)) {
4969 dns_rdataset_t rdataset;
4972 dns_rdataset_init(&rdataset);
4973 ardataset = &rdataset;
4998 * cache rdataset (because no fetch is interested
4999 * in the outcome), or the cache rdataset is not
5009 if (ardataset == &rdataset && dns_rdataset_isassociated(ardataset))
5125 ardataset = event->rdataset;
5171 mark_related(dns_name_t *name, dns_rdataset_t *rdataset,
5176 rdataset->trust = dns_trust_glue;
5181 if (rdataset->ttl == 0)
5182 rdataset->ttl = 1;
5184 rdataset->trust = dns_trust_additional;
5188 if (!CACHE(rdataset)) {
5190 rdataset->attributes |= DNS_RDATASETATTR_CHASE;
5192 rdataset->attributes |= DNS_RDATASETATTR_CACHE;
5194 rdataset->attributes |= DNS_RDATASETATTR_EXTERNAL;
5202 dns_rdataset_t *rdataset;
5214 rdataset = NULL;
5221 for (rdataset = ISC_LIST_HEAD(name->list);
5222 rdataset != NULL;
5223 rdataset = ISC_LIST_NEXT(rdataset, link)) {
5224 if (rdataset->type == dns_rdatatype_rrsig)
5225 rtype = rdataset->covers;
5227 rtype = rdataset->type;
5230 mark_related(name, rdataset, external,
5235 &rdataset);
5237 mark_related(name, rdataset, external, gluing);
5241 rdataset = NULL;
5244 type, &rdataset);
5246 mark_related(name, rdataset, external,
5268 dns_rdataset_t *rdataset;
5274 for (rdataset = ISC_LIST_HEAD(name->list);
5275 rdataset != NULL;
5276 rdataset = ISC_LIST_NEXT(rdataset, link)) {
5277 if (CHASE(rdataset)) {
5278 rdataset->attributes &= ~DNS_RDATASETATTR_CHASE;
5279 (void)dns_rdataset_additionaldata(rdataset,
5291 cname_target(dns_rdataset_t *rdataset, dns_name_t *tname) {
5296 result = dns_rdataset_first(rdataset);
5299 dns_rdataset_current(rdataset, &rdata);
5311 dname_target(dns_rdataset_t *rdataset, dns_name_t *qname, dns_name_t *oname,
5326 result = dns_rdataset_first(rdataset);
5329 dns_rdataset_current(rdataset, &rdata);
5353 trim_ns_ttl(fetchctx_t *fctx, dns_name_t *name, dns_rdataset_t *rdataset) {
5358 if (fctx->ns_ttl_ok && rdataset->ttl > fctx->ns_ttl) {
5367 rdataset->ttl, fctx->ns_ttl);
5368 rdataset->ttl = fctx->ns_ttl;
5386 dns_rdataset_t *rdataset, *ns_rdataset;
5458 for (rdataset = ISC_LIST_HEAD(name->list);
5459 rdataset != NULL;
5460 rdataset = ISC_LIST_NEXT(rdataset, link)) {
5461 type = rdataset->type;
5463 type = rdataset->covers;
5474 if (rdataset->type ==
5480 ns_rdataset = rdataset;
5484 rdataset->attributes |=
5486 rdataset->trust = dns_trust_glue;
5494 if (rdataset->type ==
5503 rdataset->attributes |=
5506 rdataset->trust =
5509 rdataset->trust =
5512 rdataset->trust =
5545 for (rdataset = ISC_LIST_HEAD(name->list);
5546 rdataset != NULL;
5547 rdataset = ISC_LIST_NEXT(rdataset, link)) {
5548 type = rdataset->type;
5550 type = rdataset->covers;
5559 rdataset->attributes |=
5564 rdataset->attributes |=
5568 rdataset->trust =
5571 rdataset->trust =
5574 rdataset->trust =
5590 if (rdataset->type ==
5599 rdataset->attributes |=
5602 rdataset->trust =
5605 rdataset->trust =
5608 rdataset->trust =
5681 * Mark any additional data related to this rdataset.
5737 dns_rdataset_t *rdataset, *ns_rdataset;
5773 for (rdataset = ISC_LIST_HEAD(name->list);
5774 rdataset != NULL;
5775 rdataset = ISC_LIST_NEXT(rdataset, link)) {
5779 if (rdataset->type == dns_rdatatype_nsec3) {
5786 if (rdataset->type == type && !found_cname) {
5802 } else if (rdataset->type == dns_rdatatype_rrsig
5803 && rdataset->covers == type
5812 } else if (rdataset->type ==
5831 result = cname_target(rdataset,
5835 } else if (rdataset->type == dns_rdatatype_rrsig
5836 && rdataset->covers ==
5855 rdataset->attributes |=
5857 rdataset->trust = dns_trust_answer;
5872 rdataset->attributes |= aflag;
5874 rdataset->trust =
5882 rdataset->attributes |=
5888 * to this rdataset.
5891 rdataset,
5902 rdataset->attributes |=
5909 * log that we're ignoring this rdataset.
5919 * rdataset loop because doing that would
5931 for (rdataset = ISC_LIST_HEAD(name->list);
5932 rdataset != NULL;
5933 rdataset = ISC_LIST_NEXT(rdataset, link)) {
5937 if (rdataset->type == dns_rdatatype_dname) {
5951 result = dname_target(rdataset,
5966 } else if (rdataset->type == dns_rdatatype_rrsig
5967 && rdataset->covers ==
5984 rdataset->attributes |=
5986 rdataset->trust = dns_trust_answer;
5999 rdataset->attributes |= aflag;
6001 rdataset->trust =
6004 rdataset->attributes |=
6033 rdataset->attributes |=
6100 for (rdataset = ISC_LIST_HEAD(name->list);
6101 rdataset != NULL;
6102 rdataset = ISC_LIST_NEXT(rdataset, link)) {
6103 if (rdataset->type == dns_rdatatype_ns ||
6104 (rdataset->type == dns_rdatatype_rrsig &&
6105 rdataset->covers == dns_rdatatype_ns)) {
6108 rdataset->attributes |=
6111 rdataset->trust =
6114 rdataset->trust =
6117 if (rdataset->type == dns_rdatatype_ns) {
6119 ns_rdataset = rdataset;
6123 * to this rdataset.
6126 rdataset,
6215 dns_rdataset_clone(fevent->rdataset, &fctx->nameservers);
6258 if (dns_rdataset_isassociated(fevent->rdataset))
6259 dns_rdataset_disassociate(fevent->rdataset);
6279 if (dns_rdataset_isassociated(fevent->rdataset))
6280 dns_rdataset_disassociate(fevent->rdataset);
6296 dns_rdataset_t *rdataset;
6304 for (rdataset = ISC_LIST_HEAD(name->list);
6305 rdataset != NULL;
6306 rdataset = ISC_LIST_NEXT(rdataset, link)) {
6307 for (result = dns_rdataset_first(rdataset);
6309 result = dns_rdataset_next(rdataset)) {
6310 dns_rdataset_current(rdataset, &rdata);
6316 rdataset->attributes |=
7527 if (dns_rdataset_isassociated(fevent->rdataset))
7528 dns_rdataset_disassociate(fevent->rdataset);
7531 isc_mem_put(res->mctx, fevent->rdataset, sizeof(*fevent->rdataset));
7540 dns_rdataset_t *rdataset;
7569 rdataset = isc_mem_get(res->mctx, sizeof(*rdataset));
7570 if (rdataset == NULL) {
7578 dns_rdataset_init(rdataset);
7585 res, rdataset, NULL,
7777 dns_rdataset_t *rdataset,
7784 rdataset, sigrdataset, fetchp));
7795 dns_rdataset_t *rdataset,
7821 REQUIRE(!dns_rdataset_isassociated(rdataset));
7892 rdataset, sigrdataset, fetch);