+2862. [bug] nsupdate didn't default to the parent zone when
+ updating DS records. [RT #20896]
+
2861. [doc] dnssec-settime man pages didn't correctly document the
inactivation time. [RT #21039]
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: nsupdate.c,v 1.175 2010/03/04 23:50:34 tbox Exp $ */
+/* $Id: nsupdate.c,v 1.176 2010/03/09 03:46:12 marka Exp $ */
/*! \file */
dns_name_init(name, NULL);
dns_name_clone(userzone, name);
} else {
+ dns_rdataset_t *rdataset;
result = dns_message_firstname(updatemsg, section);
if (result == ISC_R_NOMORE) {
section = DNS_SECTION_PREREQUISITE;
dns_message_currentname(updatemsg, section, &firstname);
dns_name_init(name, NULL);
dns_name_clone(firstname, name);
+ /*
+ * Looks to see if the first name references a DS record
+ * and if that name is not the root remove a label as DS
+ * records live in the parent zone so we need to start our
+ * search one label up.
+ */
+ rdataset = ISC_LIST_HEAD(firstname->list);
+ if (section == DNS_SECTION_UPDATE &&
+ !dns_name_equal(firstname, dns_rootname) &&
+ rdataset->type == dns_rdatatype_ds) {
+ unsigned int labels = dns_name_countlabels(name);
+ dns_name_getlabelsequence(name, 1, labels - 1, name);
+ }
}
ISC_LIST_INIT(name->list);