suppress glue in most cache retrievals; get rid of NXGLUE

This commit is contained in:
Bob Halley 1999-10-25 21:19:02 +00:00
parent e1c4942037
commit 8d298aca1c
2 changed files with 7 additions and 25 deletions

View file

@ -591,7 +591,9 @@ dns_db_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
* If type == dns_rdataset_any, then rdataset will not be bound.
*
* If 'options' does not have DNS_DBFIND_GLUEOK set, then no glue will
* be returned. This option is only meaningful for zone databases.
* be returned. For zone databases, glue is as defined in RFC 2181.
* For cache databases, glue is any rdataset with a trust of
* dns_trust_glue.
*
* If the DNS_DBFIND_NOWILD option is set, then wildcard matching will
* be disabled. This option is only meaningful for zone databases.
@ -687,15 +689,6 @@ dns_db_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
* DNS_R_NXRRSET The desired name exists, but
* the desired type does not.
*
* DNS_R_NXGLUE The desired name exists, but
* is at or beneath a zonecut.
* The desired type does not
* exist. This result can only
* occur if 'db' is a zone
* database and the
* DNS_DBFIND_GLUEOK option is
* set.
*
* DNS_R_NOTFOUND The desired name does not
* exist, and no delegation could
* be found. This result can only

View file

@ -1849,20 +1849,7 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
/*
* We were trying to find glue at a node beneath a
* zone cut, but didn't.
*/
if ((search.options & DNS_DBFIND_GLUEOK) != 0) {
/*
* Finding glue is OK. Tell the caller the
* glue doesn't exist.
*/
result = DNS_R_NXGLUE;
if (nodep != NULL) {
new_reference(search.rbtdb, node);
*nodep = node;
}
goto node_exit;
}
/*
*
* Return the delegation.
*/
UNLOCK(&(search.rbtdb->node_locks[node->locknum].lock));
@ -2418,7 +2405,9 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
/*
* If we didn't find what we were looking for...
*/
if (found == NULL) {
if (found == NULL ||
(found->trust == dns_trust_glue &&
((options & DNS_DBFIND_GLUEOK) == 0))) {
/*
* If there is an NS rdataset at this node, then this is the
* deepest zone cut.