Commit 8758d36a authored by Mark Andrews's avatar Mark Andrews

use client->query.qname

parent 138268b7
...@@ -4672,6 +4672,7 @@ redirect2(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset, ...@@ -4672,6 +4672,7 @@ redirect2(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset,
dns_dbversion_t *version = NULL; dns_dbversion_t *version = NULL;
dns_zone_t *zone = NULL; dns_zone_t *zone = NULL;
bool is_zone; bool is_zone;
unsigned int labels;
unsigned int options; unsigned int options;
CTRACE(ISC_LOG_DEBUG(3), "redirect2"); CTRACE(ISC_LOG_DEBUG(3), "redirect2");
...@@ -4714,12 +4715,13 @@ redirect2(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset, ...@@ -4714,12 +4715,13 @@ redirect2(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset,
} }
redirectname = dns_fixedname_initname(&fixedredirect); redirectname = dns_fixedname_initname(&fixedredirect);
if (dns_name_countlabels(name) > 1U) { labels = dns_name_countlabels(client->query.qname);
if (labels > 1U) {
dns_name_t prefix; dns_name_t prefix;
unsigned int labels = dns_name_countlabels(name) - 1;
dns_name_init(&prefix, NULL); dns_name_init(&prefix, NULL);
dns_name_getlabelsequence(name, 0, labels, &prefix); dns_name_getlabelsequence(client->query.qname, 0, labels - 1,
&prefix);
result = dns_name_concatenate(&prefix, result = dns_name_concatenate(&prefix,
client->view->redirectzone, client->view->redirectzone,
redirectname, NULL); redirectname, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment