* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: resolver.c,v 1.284.18.91 2009/06/02 23:46:04 tbox Exp $ */
+/* $Id: resolver.c,v 1.284.18.92 2009/07/13 06:34:13 marka Exp $ */
/*! \file */
* DS records are found in the parent server.
* Strip label to get the correct forwarder (if any).
*/
- if (fctx->type == dns_rdatatype_ds &&
+ if (dns_rdatatype_atparent(fctx->type) &&
dns_name_countlabels(name) > 1) {
dns_name_init(&suffix, NULL);
labels = dns_name_countlabels(name);
if (domain == NULL) {
dns_forwarders_t *forwarders = NULL;
unsigned int labels;
+ dns_name_t *fwdname = name;
/*
* DS records are found in the parent server.
* Strip label to get the correct forwarder (if any).
*/
- if (fctx->type == dns_rdatatype_ds &&
+ if (dns_rdatatype_atparent(fctx->type) &&
dns_name_countlabels(name) > 1) {
dns_name_init(&suffix, NULL);
labels = dns_name_countlabels(name);
dns_name_getlabelsequence(name, 1, labels - 1, &suffix);
- name = &suffix;
+ fwdname = &suffix;
}
dns_fixedname_init(&fixed);
domain = dns_fixedname_name(&fixed);
- result = dns_fwdtable_find2(fctx->res->view->fwdtable, name,
+ result = dns_fwdtable_find2(fctx->res->view->fwdtable, fwdname,
domain, &forwarders);
if (result == ISC_R_SUCCESS)
fctx->fwdpolicy = forwarders->fwdpolicy;
* nameservers, and we're not in forward-only mode,
* so find the best nameservers to use.
*/
- if (dns_rdatatype_atparent(type))
+ if (dns_rdatatype_atparent(fctx->type))
findoptions |= DNS_DBFIND_NOEXACT;
result = dns_view_findzonecut(res->view, name, domain,
0, findoptions, ISC_TRUE,