diff --git a/lib/dns/adb.c b/lib/dns/adb.c index 517973d705..69d25918d8 100644 --- a/lib/dns/adb.c +++ b/lib/dns/adb.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: adb.c,v 1.161 2000/12/20 03:38:41 bwelling Exp $ */ +/* $Id: adb.c,v 1.162 2000/12/20 23:31:04 bwelling Exp $ */ /* * Implementation notes @@ -423,7 +423,8 @@ static isc_result_t dbfind_a6(dns_adbname_t *, isc_stdtime_t); #define NXDOMAIN_RESULT(r) ((r) == DNS_R_NXDOMAIN || \ (r) == DNS_R_NCACHENXDOMAIN) #define NXRRSET_RESULT(r) ((r) == DNS_R_NCACHENXRRSET || \ - (r) == DNS_R_NXRRSET) + (r) == DNS_R_NXRRSET || \ + (r) == DNS_R_HINTNXRRSET) /* * Error state rankings. diff --git a/lib/dns/include/dns/result.h b/lib/dns/include/dns/result.h index 59530a7b59..4978810e0b 100644 --- a/lib/dns/include/dns/result.h +++ b/lib/dns/include/dns/result.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: result.h,v 1.75 2000/12/13 00:15:38 tale Exp $ */ +/* $Id: result.h,v 1.76 2000/12/20 23:31:10 bwelling Exp $ */ #ifndef DNS_RESULT_H #define DNS_RESULT_H 1 @@ -109,8 +109,9 @@ #define DNS_R_METATYPE (ISC_RESULTCLASS_DNS + 70) #define DNS_R_CNAMEANDOTHER (ISC_RESULTCLASS_DNS + 71) #define DNS_R_SINGLETON (ISC_RESULTCLASS_DNS + 72) +#define DNS_R_HINTNXRRSET (ISC_RESULTCLASS_DNS + 73) -#define DNS_R_NRESULTS 73 /* Number of results */ +#define DNS_R_NRESULTS 74 /* Number of results */ /* * DNS wire format rcodes. diff --git a/lib/dns/include/dns/view.h b/lib/dns/include/dns/view.h index 95dc2b0dab..6a0c6240a1 100644 --- a/lib/dns/include/dns/view.h +++ b/lib/dns/include/dns/view.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: view.h,v 1.60 2000/12/20 03:38:46 bwelling Exp $ */ +/* $Id: view.h,v 1.61 2000/12/20 23:31:11 bwelling Exp $ */ #ifndef DNS_VIEW_H #define DNS_VIEW_H 1 @@ -394,7 +394,9 @@ dns_view_find(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type, * * If 'use_hints' is ISC_TRUE, and the view has a hints database, then * it will be searched last. If the answer is found in the hints - * database, the result code will be DNS_R_HINT. + * database, the result code will be DNS_R_HINT. If the name is found + * in the hints database but not the type, the result code will be + * DNS_R_HINTNXRRSET. * * 'foundname' must meet the requirements of dns_db_find(). * @@ -460,7 +462,9 @@ dns_view_simplefind(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type, * * If 'use_hints' is ISC_TRUE, and the view has a hints database, then * it will be searched last. If the answer is found in the hints - * database, the result code will be DNS_R_HINT. + * database, the result code will be DNS_R_HINT. If the name is found + * in the hints database but not the type, the result code will be + * DNS_R_HINTNXRRSET. * * If 'sigrdataset' is not NULL, and there is a SIG rdataset which * covers 'type', then 'sigrdataset' will be bound to it. diff --git a/lib/dns/result.c b/lib/dns/result.c index abdebddd0f..992f67d494 100644 --- a/lib/dns/result.c +++ b/lib/dns/result.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: result.c,v 1.83 2000/12/13 00:15:13 tale Exp $ */ +/* $Id: result.c,v 1.84 2000/12/20 23:31:05 bwelling Exp $ */ #include @@ -112,7 +112,8 @@ static const char *text[DNS_R_NRESULTS] = { "invalid use of a meta type", /* 70 DNS_R_METATYPE */ "CNAME and other data", /* 71 DNS_R_CNAMEANDOTHER */ - "multiple RRs of singleton type" /* 72 DNS_R_SINGLETON */ + "multiple RRs of singleton type", /* 72 DNS_R_SINGLETON */ + "hint nxrrset" /* 73 DNS_R_HINTNXRRSET */ }; static const char *rcode_text[DNS_R_NRCODERESULTS] = { diff --git a/lib/dns/view.c b/lib/dns/view.c index 22307c3b80..e28ed36ddb 100644 --- a/lib/dns/view.c +++ b/lib/dns/view.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: view.c,v 1.88 2000/12/20 03:38:43 bwelling Exp $ */ +/* $Id: view.c,v 1.89 2000/12/20 23:31:06 bwelling Exp $ */ #include @@ -759,8 +759,10 @@ dns_view_find(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type, dns_resolver_prime(view->resolver); dns_db_attach(view->hints, &db); result = DNS_R_HINT; - } else if (result == DNS_R_NXDOMAIN || - result == DNS_R_NXRRSET) + } else if (result == DNS_R_NXRRSET) { + dns_db_attach(view->hints, &db); + result = DNS_R_HINTNXRRSET; + } else if (result == DNS_R_NXDOMAIN) result = ISC_R_NOTFOUND; } @@ -838,6 +840,7 @@ dns_view_simplefind(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type, result != DNS_R_NCACHENXDOMAIN && result != DNS_R_NCACHENXRRSET && result != DNS_R_NXRRSET && + result != DNS_R_HINTNXRRSET && result != ISC_R_NOTFOUND) { if (dns_rdataset_isassociated(rdataset)) dns_rdataset_disassociate(rdataset);