mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 18:52:07 -04:00
suppress glue in most cache retrievals; get rid of NXGLUE
This commit is contained in:
parent
e1c4942037
commit
8d298aca1c
2 changed files with 7 additions and 25 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue