Commit ff5fcd9e authored by Bob Halley's avatar Bob Halley
Browse files

NXRRSET NXT support

parent c1943794
......@@ -527,9 +527,7 @@ query_addrrset(ns_client_t *client, dns_name_t **namep,
* There's nothing else to do;
*/
return;
}
if (result == DNS_R_NXDOMAIN) {
} else if (result == DNS_R_NXDOMAIN) {
/*
* The name doesn't exist.
*/
......@@ -844,18 +842,41 @@ query_find(ns_client_t *client) {
break;
case DNS_R_NXRDATASET:
INSIST(is_zone);
if (dns_rdataset_isassociated(rdataset)) {
/*
* Add SOA.
* If we've got a NXT record, we need to save the
* name now because we're going call query_addsoa()
* below, and it needs to use the name buffer.
*/
query_keepname(client, fname, dbuf);
/*
* We don't want the cleanup code to try to release
* fname if we fail below, so we set it to NULL.
*/
tname = fname;
fname = NULL;
} else {
/*
* We're not going to use fname, and need to release
* our hold on the name buffer so query_addsoa()
* may use it.
*/
query_releasename(client, &fname);
}
/*
* Add SOA.
*/
result = query_addsoa(client, db);
if (result != ISC_R_SUCCESS) {
QUERY_ERROR(result);
goto cleanup;
}
/*
* XXXRTH Add NXT record here.
* Add NXT record if we found one.
*/
if (dns_rdataset_isassociated(rdataset))
query_addrrset(client, &tname, &rdataset, NULL,
DNS_SECTION_AUTHORITY);
goto cleanup;
case DNS_R_NXDOMAIN:
if (restarts > 0) {
......
......@@ -726,6 +726,8 @@ main(int argc, char *argv[]) {
found_as = ISC_TRUE;
break;
case DNS_R_NXRDATASET:
if (dns_rdataset_isassociated(&rdataset))
break;
if (dbi != NULL) {
if (holdmode) {
RUNTIME_CHECK(dbi->hold_count <
......
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