mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
[RT #115] find_closest_nxt() tried to concatenate . with .
when the closest NXT was owned by the root domain
This commit is contained in:
parent
5a3e08cbb2
commit
ac940fef1b
@ -1424,6 +1424,13 @@ find_wildcard(rbtdb_search_t *search, dns_rbtnode_t **nodep) {
|
|||||||
return (result);
|
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
|
static inline isc_result_t
|
||||||
find_closest_nxt(rbtdb_search_t *search, dns_dbnode_t **nodep,
|
find_closest_nxt(rbtdb_search_t *search, dns_dbnode_t **nodep,
|
||||||
dns_name_t *foundname, dns_rdataset_t *rdataset,
|
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
|
* that we're looking at one. For now, we
|
||||||
* do nothing.
|
* do nothing.
|
||||||
*/
|
*/
|
||||||
|
if (rootname(name))
|
||||||
|
origin = NULL;
|
||||||
result = dns_name_concatenate(name,
|
result = dns_name_concatenate(name,
|
||||||
origin,
|
origin,
|
||||||
foundname, NULL);
|
foundname, NULL);
|
||||||
@ -4460,13 +4469,6 @@ dbiterator_next(dns_dbiterator_t *iterator) {
|
|||||||
return (result);
|
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
|
static isc_result_t
|
||||||
dbiterator_current(dns_dbiterator_t *iterator, dns_dbnode_t **nodep,
|
dbiterator_current(dns_dbiterator_t *iterator, dns_dbnode_t **nodep,
|
||||||
dns_name_t *name)
|
dns_name_t *name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user