remove dns_name_fromstring2()

we don't need two versions of dns_name_fromstring() any longer; we
can just specify an origin value of dns_rootname for absolute names.
This commit is contained in:
Evan Hunt
2023-08-15 17:41:01 -07:00
parent 6909897adf
commit a290ed5bd0
21 changed files with 140 additions and 127 deletions

View File

@@ -127,7 +127,7 @@ dns_test_makezone(const char *name, dns_zone_t **zonep, dns_view_t *view,
*/
dns_zone_settype(zone, dns_zone_primary);
origin = dns_fixedname_initname(&fixed_origin);
result = dns_name_fromstring(origin, name, 0, NULL);
result = dns_name_fromstring(origin, name, dns_rootname, 0, NULL);
if (result != ISC_R_SUCCESS) {
goto detach_zone;
}
@@ -219,7 +219,7 @@ dns_test_loaddb(dns_db_t **db, dns_dbtype_t dbtype, const char *origin,
name = dns_fixedname_initname(&fixed);
result = dns_name_fromstring(name, origin, 0, NULL);
result = dns_name_fromstring(name, origin, dns_rootname, 0, NULL);
if (result != ISC_R_SUCCESS) {
return (result);
}
@@ -455,7 +455,8 @@ dns_test_difffromchanges(dns_diff_t *diff, const zonechange_t *changes,
* Parse owner name.
*/
name = dns_fixedname_initname(&fixedname);
result = dns_name_fromstring(name, changes[i].owner, 0, mctx);
result = dns_name_fromstring(name, changes[i].owner,
dns_rootname, 0, mctx);
if (result != ISC_R_SUCCESS) {
break;
}

View File

@@ -285,7 +285,7 @@ attach_query_msg_to_client(ns_client_t *client, const char *qnamestr,
* class IN and type "qtype", link the two and add the result to the
* QUESTION section of the query.
*/
result = dns_name_fromstring(qname, qnamestr, 0, mctx);
result = dns_name_fromstring(qname, qnamestr, dns_rootname, 0, mctx);
if (result != ISC_R_SUCCESS) {
goto put_name;
}
@@ -533,7 +533,7 @@ ns_test_loaddb(dns_db_t **db, dns_dbtype_t dbtype, const char *origin,
name = dns_fixedname_initname(&fixed);
result = dns_name_fromstring(name, origin, 0, NULL);
result = dns_name_fromstring(name, origin, dns_rootname, 0, NULL);
if (result != ISC_R_SUCCESS) {
return (result);
}