}
static void
-update_rrsetstats(dns_stats_t *stats, const dns_typepair_t htype,
+update_rrsetstats(dns_stats_t *stats, const dns_typepair_t typepair,
const uint_least16_t hattributes, const bool increment) {
dns_rdatastatstype_t statattributes = 0;
dns_rdatastatstype_t base = 0;
dns_rdatastatstype_t type;
dns_slabheader_t *header = &(dns_slabheader_t){
- .type = htype,
+ .typepair = typepair,
.attributes = hattributes,
};
statattributes = DNS_RDATASTATSTYPE_ATTR_NXDOMAIN;
} else {
statattributes = DNS_RDATASTATSTYPE_ATTR_NXRRSET;
- base = DNS_TYPEPAIR_COVERS(header->type);
+ base = DNS_TYPEPAIR_COVERS(header->typepair);
}
} else {
- base = DNS_TYPEPAIR_TYPE(header->type);
+ base = DNS_TYPEPAIR_TYPE(header->typepair);
}
if (STALE(header)) {
*/
stats = dns_db_getrrsetstats(&qpdb->common);
if (stats != NULL) {
- update_rrsetstats(stats, header->type, attributes, false);
- update_rrsetstats(stats, header->type, newattributes, true);
+ update_rrsetstats(stats, header->typepair, attributes, false);
+ update_rrsetstats(stats, header->typepair, newattributes, true);
}
}
rdataset->methods = &dns_rdataslab_rdatasetmethods;
rdataset->rdclass = qpdb->common.rdclass;
- rdataset->type = DNS_TYPEPAIR_TYPE(header->type);
- rdataset->covers = DNS_TYPEPAIR_COVERS(header->type);
+ rdataset->type = DNS_TYPEPAIR_TYPE(header->typepair);
+ rdataset->covers = DNS_TYPEPAIR_COVERS(header->typepair);
rdataset->ttl = !ZEROTTL(header) ? header->expire - now : 0;
rdataset->trust = header->trust;
rdataset->resign = 0;
setup_delegation(qpc_search_t *search, dns_dbnode_t **nodep,
dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset,
isc_rwlocktype_t tlocktype DNS__DB_FLARG) {
- dns_typepair_t type;
+ dns_typepair_t typepair;
qpcnode_t *node = NULL;
REQUIRE(search != NULL);
*/
node = search->zonecut;
- type = search->zonecut_header->type;
+ typepair = search->zonecut_header->typepair;
if (nodep != NULL) {
/*
NODE_UNLOCK(nlock, &nlocktype);
}
- if (type == dns_rdatatype_dname) {
+ if (typepair == dns_rdatatype_dname) {
return DNS_R_DNAME;
}
return DNS_R_DELEGATION;
* negative header covering either 'negtype' or ANY.
*/
static bool
-related_headers(dns_slabheader_t *header, dns_typepair_t type,
- dns_typepair_t sigtype, dns_typepair_t negtype,
+related_headers(dns_slabheader_t *header, dns_typepair_t typepair,
+ dns_typepair_t sigpair, dns_typepair_t negpair,
dns_slabheader_t **foundp, dns_slabheader_t **foundsigp,
bool *matchp) {
if (!EXISTS(header) || ANCIENT(header)) {
return false;
}
- if (header->type == type) {
+ if (header->typepair == typepair) {
*foundp = header;
SET_IF_NOT_NULL(matchp, true);
if (*foundsigp != NULL) {
return true;
}
- } else if (header->type == sigtype) {
+ } else if (header->typepair == sigpair) {
*foundsigp = header;
SET_IF_NOT_NULL(matchp, true);
if (*foundp != NULL) {
return true;
}
- } else if (negtype != 0 && (header->type == RDATATYPE_NCACHEANY ||
- header->type == negtype))
+ } else if (negpair != 0 && (header->typepair == RDATATYPE_NCACHEANY ||
+ header->typepair == negpair))
{
*foundp = header;
*foundsigp = NULL;
static bool
both_headers(dns_slabheader_t *header, dns_rdatatype_t type,
dns_slabheader_t **foundp, dns_slabheader_t **foundsigp) {
- dns_typepair_t matchtype = DNS_TYPEPAIR_VALUE(type, 0);
- dns_typepair_t sigmatchtype = DNS_SIGTYPE(type);
+ dns_typepair_t typepair = DNS_TYPEPAIR_VALUE(type, 0);
+ dns_typepair_t sigpair = DNS_SIGTYPE(type);
- return related_headers(header, matchtype, sigmatchtype, 0, foundp,
- foundsigp, NULL);
+ return related_headers(header, typepair, sigpair, 0, foundp, foundsigp,
+ NULL);
}
static isc_result_t
continue;
}
- if (DNS_TYPEPAIR_TYPE(header->type) == 0) {
+ if (DNS_TYPEPAIR_TYPE(header->typepair) == 0) {
continue;
}
dns_slabheader_t *found = NULL, *nsheader = NULL;
dns_slabheader_t *foundsig = NULL, *nssig = NULL, *cnamesig = NULL;
dns_slabheader_t *nsecheader = NULL, *nsecsig = NULL;
- dns_typepair_t sigtype, negtype;
+ dns_typepair_t typepair, sigpair, negpair;
qpc_search_t search;
qpc_search_init(&search, (qpcache_t *)db, options, __now);
*/
if ((search.options & DNS_DBFIND_COVERINGNSEC) != 0 &&
(search.zonecut_header == NULL ||
- search.zonecut_header->type != dns_rdatatype_dname))
+ search.zonecut_header->typepair != dns_rdatatype_dname))
{
result = find_coveringnsec(
&search, name, nodep, foundname, rdataset,
*/
found = NULL;
foundsig = NULL;
- sigtype = DNS_SIGTYPE(type);
- negtype = DNS_TYPEPAIR_VALUE(0, type);
+ typepair = DNS_TYPEPAIR_VALUE(type, 0);
+ sigpair = DNS_SIGTYPE(type);
+ negpair = DNS_TYPEPAIR_VALUE(0, type);
nsheader = NULL;
nsecheader = NULL;
nssig = NULL;
}
bool match = false;
- if (related_headers(header, type, sigtype, negtype, &found,
+ if (related_headers(header, typepair, sigpair, negpair, &found,
&foundsig, &match) &&
!MISSING_ANSWER(found, options))
{
continue;
}
- switch (header->type) {
+ switch (header->typepair) {
case dns_rdatatype_cname:
if (!cname_ok) {
break;
foundsig = cnamesig;
} else {
/* Look for CNAME signature instead */
- sigtype = DNS_SIGTYPE(dns_rdatatype_cname);
+ sigpair = DNS_SIGTYPE(dns_rdatatype_cname);
foundsig = NULL;
}
break;
break;
default:
- if (type == dns_rdatatype_any &&
- DNS_TYPEPAIR_TYPE(header->type) != 0)
+ if (typepair == dns_rdatatype_any &&
+ DNS_TYPEPAIR_TYPE(header->typepair) != 0)
{
/* QTYPE==ANY, so any anwers will do */
found = header;
} else {
result = DNS_R_NCACHENXRRSET;
}
- } else if (type != found->type && type != dns_rdatatype_any &&
- found->type == dns_rdatatype_cname)
+ } else if (typepair != found->typepair &&
+ typepair != dns_rdatatype_any &&
+ found->typepair == dns_rdatatype_cname)
{
/*
* We weren't doing an ANY query and we found a CNAME instead
result = ISC_R_SUCCESS;
}
- if (type != dns_rdatatype_any || result == DNS_R_NCACHENXDOMAIN ||
+ if (typepair != dns_rdatatype_any || result == DNS_R_NCACHENXDOMAIN ||
result == DNS_R_NCACHENXRRSET)
{
bindrdatasets(search.qpdb, node, found, foundsig, search.now,
for (header = node->data; header != NULL; header = header_next) {
header_next = header->next;
- bool ns = (header->type == dns_rdatatype_ns ||
- header->type == DNS_SIGTYPE(dns_rdatatype_ns));
+ bool ns = (header->typepair == dns_rdatatype_ns ||
+ header->typepair == DNS_SIGTYPE(dns_rdatatype_ns));
if (check_stale_header(header, search, &header_prev)) {
if (ns) {
/*
dns_slabheader_t *header = NULL;
dns_slabheader_t *header_prev = NULL, *header_next = NULL;
dns_slabheader_t *found = NULL, *foundsig = NULL;
- dns_typepair_t matchtype, sigmatchtype, negtype;
+ dns_typepair_t typepair, sigpair, negpair;
isc_result_t result;
isc_rwlock_t *nlock = NULL;
isc_rwlocktype_t nlocktype = isc_rwlocktype_none;
nlock = &qpdb->buckets[qpnode->locknum].lock;
NODE_RDLOCK(nlock, &nlocktype);
- matchtype = DNS_TYPEPAIR_VALUE(type, covers);
- negtype = DNS_TYPEPAIR_VALUE(0, type);
- sigmatchtype = (covers == 0) ? DNS_SIGTYPE(type) : 0;
+ typepair = DNS_TYPEPAIR_VALUE(type, covers);
+ negpair = DNS_TYPEPAIR_VALUE(0, type);
+ sigpair = (covers == 0) ? DNS_SIGTYPE(type) : 0;
for (header = qpnode->data; header != NULL; header = header_next) {
header_next = header->next;
continue;
}
- if (related_headers(header, matchtype, sigmatchtype, negtype,
- &found, &foundsig, NULL))
+ if (related_headers(header, typepair, sigpair, negpair, &found,
+ &foundsig, NULL))
{
break;
}
static bool
prio_header(dns_slabheader_t *header) {
- if (NEGATIVE(header) && prio_type(DNS_TYPEPAIR_COVERS(header->type))) {
+ if (NEGATIVE(header) &&
+ prio_type(DNS_TYPEPAIR_COVERS(header->typepair)))
+ {
return true;
}
- return prio_type(header->type);
+ return prio_type(header->typepair);
}
static void
dns_slabheader_t *topheader = NULL, *topheader_prev = NULL;
dns_slabheader_t *header = NULL, *sigheader = NULL;
dns_slabheader_t *prioheader = NULL, *expireheader = NULL;
- dns_typepair_t negtype = 0;
+ dns_typepair_t negpair = 0;
dns_trust_t trust;
uint32_t ntypes = 0;
}
if (EXISTS(newheader)) {
- dns_rdatatype_t rdtype = DNS_TYPEPAIR_TYPE(newheader->type);
- dns_rdatatype_t covers = DNS_TYPEPAIR_COVERS(newheader->type);
- dns_typepair_t sigtype = DNS_SIGTYPE(covers);
+ dns_rdatatype_t rdtype = DNS_TYPEPAIR_TYPE(newheader->typepair);
+ dns_rdatatype_t covers =
+ DNS_TYPEPAIR_COVERS(newheader->typepair);
+ dns_typepair_t sigpair = DNS_SIGTYPE(covers);
if (NEGATIVE(newheader)) {
/*
* We're adding a negative cache entry.
for (topheader = qpnode->data; topheader != NULL;
topheader = topheader->next)
{
- if (topheader->type == sigtype) {
+ if (topheader->typepair == sigpair) {
sigheader = topheader;
break;
}
}
- negtype = DNS_TYPEPAIR_VALUE(covers, 0);
+ negpair = DNS_TYPEPAIR_VALUE(covers, 0);
} else {
/*
* We're adding something that isn't a
for (topheader = qpnode->data; topheader != NULL;
topheader = topheader->next)
{
- if ((topheader->type == RDATATYPE_NCACHEANY) ||
- (newheader->type == sigtype &&
- topheader->type ==
+ if ((topheader->typepair ==
+ RDATATYPE_NCACHEANY) ||
+ (newheader->typepair == sigpair &&
+ topheader->typepair ==
DNS_TYPEPAIR_VALUE(0, covers)))
{
break;
topheader = NULL;
goto find_header;
}
- negtype = DNS_TYPEPAIR_VALUE(0, rdtype);
+ negpair = DNS_TYPEPAIR_VALUE(0, rdtype);
}
}
prioheader = topheader;
}
- if (topheader->type == newheader->type ||
- topheader->type == negtype)
+ if (topheader->typepair == newheader->typepair ||
+ topheader->typepair == negpair)
{
break;
}
* special to be done w.r.t stale data; it gets replaced
* normally further down.
*/
- if (ACTIVE(header, now) && header->type == dns_rdatatype_ns &&
- EXISTS(header) && EXISTS(newheader) &&
- header->trust >= newheader->trust &&
+ if (ACTIVE(header, now) &&
+ header->typepair == dns_rdatatype_ns && EXISTS(header) &&
+ EXISTS(newheader) && header->trust >= newheader->trust &&
dns_rdataslab_equalx(header, newheader,
qpdb->common.rdclass,
- (dns_rdatatype_t)header->type))
+ DNS_TYPEPAIR_TYPE(header->typepair)))
{
/*
* Honour the new ttl if it is less than the
* to be no more than the current NS RRset's TTL. This
* ensures the delegations that are withdrawn are honoured.
*/
- if (ACTIVE(header, now) && header->type == dns_rdatatype_ns &&
- EXISTS(header) && EXISTS(newheader) &&
- header->trust <= newheader->trust)
+ if (ACTIVE(header, now) &&
+ header->typepair == dns_rdatatype_ns && EXISTS(header) &&
+ EXISTS(newheader) && header->trust <= newheader->trust)
{
if (newheader->expire > header->expire) {
newheader->expire = header->expire;
}
if (ACTIVE(header, now) &&
(options & DNS_DBADD_PREFETCH) == 0 &&
- (header->type == dns_rdatatype_a ||
- header->type == dns_rdatatype_aaaa ||
- header->type == dns_rdatatype_ds ||
- header->type == DNS_SIGTYPE(dns_rdatatype_ds)) &&
+ (header->typepair == dns_rdatatype_a ||
+ header->typepair == dns_rdatatype_aaaa ||
+ header->typepair == dns_rdatatype_ds ||
+ header->typepair == DNS_SIGTYPE(dns_rdatatype_ds)) &&
EXISTS(header) && EXISTS(newheader) &&
header->trust >= newheader->trust &&
dns_rdataslab_equal(header, newheader))
if (qpdb->rrsetstats != NULL) {
DNS_SLABHEADER_SETATTR(newheader, DNS_SLABHEADERATTR_STATCOUNT);
- update_rrsetstats(qpdb->rrsetstats, newheader->type,
+ update_rrsetstats(qpdb->rrsetstats, newheader->typepair,
atomic_load_acquire(&newheader->attributes),
true);
}
}
newheader = dns_slabheader_new(db, node);
- newheader->type = DNS_TYPEPAIR_VALUE(type, covers);
+ newheader->typepair = DNS_TYPEPAIR_VALUE(type, covers);
setttl(newheader, 0);
atomic_init(&newheader->attributes, DNS_SLABHEADERATTR_NONEXISTENT);
isc_heap_delete(header->heap, header->heap_index);
}
- update_rrsetstats(qpdb->rrsetstats, header->type,
+ update_rrsetstats(qpdb->rrsetstats, header->typepair,
atomic_load_acquire(&header->attributes), false);
if (ISC_LINK_LINKED(header, link)) {
return h1->resign < h2->resign ||
(h1->resign == h2->resign && h1->resign_lsb < h2->resign_lsb) ||
(h1->resign == h2->resign && h1->resign_lsb == h2->resign_lsb &&
- h2->type == DNS_SIGTYPE(dns_rdatatype_soa));
+ h2->typepair == DNS_SIGTYPE(dns_rdatatype_soa));
}
/*%
rdataset->methods = &dns_rdataslab_rdatasetmethods;
rdataset->rdclass = qpdb->common.rdclass;
- rdataset->type = DNS_TYPEPAIR_TYPE(header->type);
- rdataset->covers = DNS_TYPEPAIR_COVERS(header->type);
+ rdataset->type = DNS_TYPEPAIR_TYPE(header->typepair);
+ rdataset->covers = DNS_TYPEPAIR_COVERS(header->typepair);
rdataset->ttl = header->ttl;
rdataset->trust = header->trust;
} while (header != NULL);
if (header != NULL &&
- (header->type == dns_rdatatype_nsec3param))
+ (header->typepair == dns_rdatatype_nsec3param))
{
/*
* Find an NSEC3PARAM with a supported algorithm.
uint32_t serial;
qpz_version_t *version = (qpz_version_t *)dbversion;
bool close_version = false;
- dns_typepair_t matchtype, sigmatchtype;
+ dns_typepair_t typepair, sigpair;
isc_rwlocktype_t nlocktype = isc_rwlocktype_none;
isc_rwlock_t *nlock = NULL;
nlock = qpzone_get_lock(node);
NODE_RDLOCK(nlock, &nlocktype);
- matchtype = DNS_TYPEPAIR_VALUE(type, covers);
+ typepair = DNS_TYPEPAIR_VALUE(type, covers);
if (covers == 0) {
- sigmatchtype = DNS_SIGTYPE(type);
+ sigpair = DNS_SIGTYPE(type);
} else {
- sigmatchtype = 0;
+ sigpair = 0;
}
for (header = node->data; header != NULL; header = header_next) {
* We have an active, extant rdataset. If it's a
* type we're looking for, remember it.
*/
- if (header->type == matchtype) {
+ if (header->typepair == typepair) {
found = header;
if (foundsig != NULL) {
break;
}
- } else if (header->type == sigmatchtype) {
+ } else if (header->typepair == sigpair) {
foundsig = header;
if (found != NULL) {
break;
}
static bool
-delegating_type(qpzonedb_t *qpdb, qpznode_t *node, dns_typepair_t type) {
- return type == dns_rdatatype_dname ||
- (type == dns_rdatatype_ns &&
+delegating_type(qpzonedb_t *qpdb, qpznode_t *node, dns_typepair_t typepair) {
+ return typepair == dns_rdatatype_dname ||
+ (typepair == dns_rdatatype_ns &&
(node != qpdb->origin || IS_STUB(qpdb)));
}
for (header = node->data; header != NULL; header = header_next) {
header_next = header->next;
- rdtype = DNS_TYPEPAIR_TYPE(header->type);
+ rdtype = DNS_TYPEPAIR_TYPE(header->typepair);
if (rdtype == dns_rdatatype_cname) {
do {
if (header->serial <= serial && !IGNORE(header))
header = header->down;
} while (header != NULL);
if (header != NULL) {
- if (!prio_type(header->type)) {
+ if (!prio_type(header->typepair)) {
/*
* CNAME is in the priority list, so if
* we are done with priority types, we
topheader = topheader->next)
{
++ntypes;
- if (prio_type(topheader->type)) {
+ if (prio_type(topheader->typepair)) {
prioheader = topheader;
}
- if (topheader->type == newheader->type) {
+ if (topheader->typepair == newheader->typepair) {
break;
}
topheader_prev = topheader;
result = dns_rdataslab_merge(
header, newheader, qpdb->common.mctx,
qpdb->common.rdclass,
- (dns_rdatatype_t)header->type, flags,
- qpdb->maxrrperset, &merged);
+ DNS_TYPEPAIR_TYPE(header->typepair),
+ flags, qpdb->maxrrperset, &merged);
}
if (result == ISC_R_SUCCESS) {
/*
if (result == DNS_R_TOOMANYRECORDS) {
dns__db_logtoomanyrecords(
(dns_db_t *)qpdb, nodename,
- (dns_rdatatype_t)header->type,
+ DNS_TYPEPAIR_TYPE(
+ header->typepair),
"updating", qpdb->maxrrperset);
}
dns_slabheader_destroy(&newheader);
INSIST(newheader->down == NULL);
- if (prio_type(newheader->type)) {
+ if (prio_type(newheader->typepair)) {
/* This is a priority type, prepend it */
newheader->next = node->data;
node->data = newheader;
? (header->resign << 1) | header->resign_lsb
: 0;
dns_name_copy(&HEADERNODE(header)->name, foundname);
- *typepair = header->type;
+ *typepair = header->typepair;
result = ISC_R_SUCCESS;
}
UNLOCK(&qpdb->heap->lock);
isc_region_t region;
isc_result_t result;
- REQUIRE(header->type == dns_rdatatype_nsec3);
+ REQUIRE(header->typepair == dns_rdatatype_nsec3);
raw = (unsigned char *)header + sizeof(*header);
count = raw[0] * 256 + raw[1]; /* count */
dns_name_t *foundname, dns_rdataset_t *rdataset,
dns_rdataset_t *sigrdataset DNS__DB_FLARG) {
dns_name_t *zcname = NULL;
- dns_typepair_t type;
+ dns_typepair_t typepair;
qpznode_t *node = NULL;
REQUIRE(search != NULL);
*/
node = search->zonecut;
- type = search->zonecut_header->type;
+ typepair = search->zonecut_header->typepair;
/*
* If we have to set foundname, we do it before anything else.
NODE_UNLOCK(nlock, &nlocktype);
}
- if (type == dns_rdatatype_dname) {
+ if (typepair == dns_rdatatype_dname) {
return DNS_R_DNAME;
}
return DNS_R_DELEGATION;
isc_result_t result;
dns_fixedname_t fname;
dns_name_t *name = dns_fixedname_initname(&fname);
- dns_rdatatype_t type = dns_rdatatype_nsec;
- dns_typepair_t sigtype = DNS_SIGTYPE(dns_rdatatype_nsec);
- bool wraps = false;
+ dns_rdatatype_t matchtype = nsec3 ? dns_rdatatype_nsec3
+ : dns_rdatatype_nsec;
+ dns_typepair_t typepair = DNS_TYPEPAIR_VALUE(matchtype, 0);
+ dns_typepair_t sigpair = DNS_SIGTYPE(matchtype);
+ bool wraps = nsec3;
bool first = true;
bool need_sig = secure;
- if (nsec3) {
- type = dns_rdatatype_nsec3;
- sigtype = DNS_SIGTYPE(dns_rdatatype_nsec3);
- wraps = true;
- }
-
/*
* Use the auxiliary tree only starting with the second node in the
* hope that the original node will be right much of the time.
* active rdataset at this node.
*/
empty_node = false;
- if (header->type == type) {
+ if (header->typepair == typepair) {
found = header;
if (foundsig != NULL) {
break;
}
- } else if (header->type == sigtype) {
+ } else if (header->typepair == sigpair) {
foundsig = header;
if (found != NULL) {
break;
}
if (!empty_node) {
if (found != NULL && search->version->havensec3 &&
- found->type == dns_rdatatype_nsec3 &&
+ found->typepair == dns_rdatatype_nsec3 &&
!matchparams(found, search))
{
empty_node = true;
found = NULL;
foundsig = NULL;
- result = previous_closest_nsec(type, search,
+ result = previous_closest_nsec(typepair, search,
name, &prevnode,
NULL, NULL);
} else if (found != NULL &&
*/
empty_node = true;
result = previous_closest_nsec(
- type, search, name, &prevnode,
+ typepair, search, name, &prevnode,
&nseciter, &first);
} else {
/*
* This node isn't active. We've got to keep
* looking.
*/
- result = previous_closest_nsec(type, search, name,
+ result = previous_closest_nsec(typepair, search, name,
&prevnode, &nseciter,
&first);
}
*/
for (header = node->data; header != NULL; header = header_next) {
header_next = header->next;
- if (header->type == dns_rdatatype_ns ||
- header->type == dns_rdatatype_dname ||
- header->type == DNS_SIGTYPE(dns_rdatatype_dname))
+ if (header->typepair == dns_rdatatype_ns ||
+ header->typepair == dns_rdatatype_dname ||
+ header->typepair == DNS_SIGTYPE(dns_rdatatype_dname))
{
do {
if (header->serial <= search->serial &&
}
} while (header != NULL);
if (header != NULL) {
- if (header->type == dns_rdatatype_dname) {
+ if (header->typepair == dns_rdatatype_dname) {
dname_header = header;
- } else if (header->type ==
+ } else if (header->typepair ==
DNS_SIGTYPE(dns_rdatatype_dname))
{
sigdname_header = header;
dns_slabheader_t *header = NULL, *header_next = NULL;
dns_slabheader_t *found = NULL, *nsecheader = NULL;
dns_slabheader_t *foundsig = NULL, *cnamesig = NULL, *nsecsig = NULL;
- dns_typepair_t sigtype;
+ dns_typepair_t sigpair;
bool active;
isc_rwlock_t *nlock = NULL;
isc_rwlocktype_t nlocktype = isc_rwlocktype_none;
* We now go looking for rdata...
*/
- sigtype = DNS_SIGTYPE(type);
+ sigpair = DNS_SIGTYPE(type);
empty_node = true;
for (header = node->data; header != NULL; header = header_next) {
header_next = header->next;
/*
* Do special zone cut handling, if requested.
*/
- if (maybe_zonecut && header->type == dns_rdatatype_ns) {
+ if (maybe_zonecut &&
+ header->typepair == dns_rdatatype_ns)
+ {
/*
* We increment the reference count on node to
* ensure that search->zonecut_header will
* If the NSEC3 record doesn't match the chain
* we are using behave as if it isn't here.
*/
- if (header->type == dns_rdatatype_nsec3 &&
+ if (header->typepair == dns_rdatatype_nsec3 &&
!matchparams(header, &search))
{
NODE_UNLOCK(nlock, &nlocktype);
* If we found a type we were looking for,
* remember it.
*/
- if (header->type == type || type == dns_rdatatype_any ||
- (header->type == dns_rdatatype_cname && cname_ok))
+ if (header->typepair == type ||
+ type == dns_rdatatype_any ||
+ (header->typepair == dns_rdatatype_cname &&
+ cname_ok))
{
/*
* We've found the answer!
*/
found = header;
- if (header->type == dns_rdatatype_cname &&
+ if (header->typepair == dns_rdatatype_cname &&
cname_ok)
{
/*
if (cnamesig != NULL) {
foundsig = cnamesig;
} else {
- sigtype = DNS_SIGTYPE(
+ sigpair = DNS_SIGTYPE(
dns_rdatatype_cname);
}
}
if (!maybe_zonecut && foundsig != NULL) {
break;
}
- } else if (header->type == sigtype) {
+ } else if (header->typepair == sigpair) {
/*
* We've found the RRSIG rdataset for our
* target type. Remember it.
if (!maybe_zonecut && found != NULL) {
break;
}
- } else if (header->type == dns_rdatatype_nsec &&
+ } else if (header->typepair == dns_rdatatype_nsec &&
!search.version->havensec3)
{
/*
* we might need it later.
*/
nsecheader = header;
- } else if (header->type ==
+ } else if (header->typepair ==
DNS_SIGTYPE(dns_rdatatype_nsec) &&
!search.version->havensec3)
{
*/
nsecsig = header;
} else if (cname_ok &&
- header->type ==
+ header->typepair ==
DNS_SIGTYPE(dns_rdatatype_cname))
{
/*
/*
* We found what we were looking for, or we found a CNAME.
*/
- if (type != found->type && type != dns_rdatatype_any &&
- found->type == dns_rdatatype_cname)
+ if (type != found->typepair && type != dns_rdatatype_any &&
+ found->typepair == dns_rdatatype_cname)
{
/*
* We weren't doing an ANY query and we found a CNAME instead
for (topheader = node->data; topheader != NULL;
topheader = topheader->next)
{
- if (topheader->type == newheader->type) {
+ if (topheader->typepair == newheader->typepair) {
break;
}
topheader_prev = topheader;
result = dns_rdataslab_subtract(
header, newheader, qpdb->common.mctx,
qpdb->common.rdclass,
- (dns_rdatatype_t)header->type, flags,
+ DNS_TYPEPAIR_TYPE(header->typepair), flags,
&subresult);
}
if (result == ISC_R_SUCCESS) {
newheader = dns_slabheader_new((dns_db_t *)qpdb,
(dns_dbnode_t *)node);
newheader->ttl = 0;
- newheader->type = topheader->type;
+ newheader->typepair = topheader->typepair;
atomic_init(&newheader->attributes,
DNS_SLABHEADERATTR_NONEXISTENT);
newheader->serial = version->serial;
}
newheader = dns_slabheader_new(db, (dns_dbnode_t *)node);
- newheader->type = DNS_TYPEPAIR_VALUE(type, covers);
+ newheader->typepair = DNS_TYPEPAIR_VALUE(type, covers);
newheader->ttl = 0;
atomic_init(&newheader->attributes, DNS_SLABHEADERATTR_NONEXISTENT);
newheader->serial = version->serial;