Commit ac940fef authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

[RT #115] find_closest_nxt() tried to concatenate . with .

when the closest NXT was owned by the root domain
parent 5a3e08cb
......@@ -1424,6 +1424,13 @@ find_wildcard(rbtdb_search_t *search, dns_rbtnode_t **nodep) {
return (result);
}
static inline isc_boolean_t
rootname(dns_name_t *name) {
if (dns_name_countlabels(name) == 1 && dns_name_isabsolute(name))
return (ISC_TRUE);
return (ISC_FALSE);
}
static inline isc_result_t
find_closest_nxt(rbtdb_search_t *search, dns_dbnode_t **nodep,
dns_name_t *foundname, dns_rdataset_t *rdataset,
......@@ -1504,6 +1511,8 @@ find_closest_nxt(rbtdb_search_t *search, dns_dbnode_t **nodep,
* that we're looking at one. For now, we
* do nothing.
*/
if (rootname(name))
origin = NULL;
result = dns_name_concatenate(name,
origin,
foundname, NULL);
......@@ -4460,13 +4469,6 @@ dbiterator_next(dns_dbiterator_t *iterator) {
return (result);
}
static inline isc_boolean_t
rootname(dns_name_t *name) {
if (dns_name_countlabels(name) == 1 && dns_name_isabsolute(name))
return (ISC_TRUE);
return (ISC_FALSE);
}
static isc_result_t
dbiterator_current(dns_dbiterator_t *iterator, dns_dbnode_t **nodep,
dns_name_t *name)
......
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