min-transfer-rate-in 10240 5;\n\
multi-master no;\n\
notify yes;\n\
+ notify-cds no;\n\
notify-defer 0;\n\
notify-delay 5;\n\
notify-to-soa no;\n\
dns_zone_setqueryonacl(zone, view->queryonacl);
}
dns_zone_setcheckdstype(zone, dns_checkdstype_no);
- dns_zone_setnotifytype(zone, dns_notifytype_no);
+ dns_zone_setnotifytype(zone, dns_rdatatype_soa, dns_notifytype_no);
+ dns_zone_setnotifytype(zone, dns_rdatatype_cds, dns_notifytype_no);
dns_zone_setoption(zone, DNS_ZONEOPT_NOCHECKNS, true);
setquerystats(zone, mctx, dns_zonestat_none);
CHECK(dns_view_addzone(view, zone));
dns_zone_setoption(zone, DNS_ZONEOPT_NOCHECKNS, true);
dns_zone_setoption(zone, DNS_ZONEOPT_ZONEVERSION, false);
dns_zone_setcheckdstype(zone, dns_checkdstype_no);
- dns_zone_setnotifytype(zone, dns_notifytype_no);
+ dns_zone_setnotifytype(zone, dns_rdatatype_soa, dns_notifytype_no);
+ dns_zone_setnotifytype(zone, dns_rdatatype_cds, dns_notifytype_no);
dns_zone_setautomatic(zone, true);
if (view->queryacl != NULL) {
dns_zone_setqueryacl(zone, view->queryacl);
dns_zone_setstats(zone, named_g_server->zonestats);
dns_zone_setdbtype(zone, dbtypec, dbtype);
dns_zone_setcheckdstype(zone, dns_checkdstype_no);
- dns_zone_setnotifytype(zone, dns_notifytype_no);
+ dns_zone_setnotifytype(zone, dns_rdatatype_soa,
+ dns_notifytype_no);
+ dns_zone_setnotifytype(zone, dns_rdatatype_cds,
+ dns_notifytype_no);
dns_zone_setautomatic(zone, true);
dns_zone_setoption(zone, DNS_ZONEOPT_NOCHECKNS, true);
} else {
dns_acl_detach(&none);
dns_zone_setcheckdstype(zone, dns_checkdstype_no);
- dns_zone_setnotifytype(zone, dns_notifytype_no);
+ dns_zone_setnotifytype(zone, dns_rdatatype_soa, dns_notifytype_no);
+ dns_zone_setnotifytype(zone, dns_rdatatype_cds, dns_notifytype_no);
dns_zone_setoption(zone, DNS_ZONEOPT_NOCHECKNS, true);
dns_zone_setjournalsize(zone, 0);
notifytype = process_notifytype(notifytype, ztype, zname,
nodefault);
if (raw != NULL) {
- dns_zone_setnotifytype(raw, dns_notifytype_no);
+ dns_zone_setnotifytype(raw, dns_rdatatype_soa,
+ dns_notifytype_no);
}
- dns_zone_setnotifytype(zone, notifytype);
+ dns_zone_setnotifytype(zone, dns_rdatatype_soa, notifytype);
+
+ obj = NULL;
+ result = named_config_get(maps, "notify-cds", &obj);
+ INSIST(result == ISC_R_SUCCESS && obj != NULL);
+ if (raw != NULL) {
+ dns_zone_setnotifytype(raw, dns_rdatatype_cds,
+ dns_notifytype_no);
+ }
+ dns_zone_setnotifytype(zone, dns_rdatatype_cds,
+ cfg_obj_asboolean(obj));
obj = NULL;
result = named_config_get(maps, "also-notify", &obj);
}
}
} else if (ztype == dns_zone_redirect) {
- dns_zone_setnotifytype(zone, dns_notifytype_no);
+ dns_zone_setnotifytype(zone, dns_rdatatype_soa,
+ dns_notifytype_no);
+ dns_zone_setnotifytype(zone, dns_rdatatype_cds,
+ dns_notifytype_no);
obj = NULL;
result = named_config_get(maps, "max-journal-size", &obj);
--- /dev/null
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * SPDX-License-Identifier: MPL-2.0
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
+ *
+ * See the COPYRIGHT file distributed with this work for additional
+ * information regarding copyright ownership.
+ */
+
+/*
+ * Bad notify-cds type
+ */
+
+zone dummy {
+ type primary;
+ file "xxxx";
+ notify-cds explicit;
+};
1.2.3.5;
};
dnssec-policy "test";
+ notify-cds no;
parental-source 10.10.10.10;
};
zone "dnssec-default" {
"parents";
};
dnssec-policy "default";
+ notify-cds yes;
};
zone "dnssec-inherit" {
type primary;
min-transfer-rate-in <integer> <integer>;
multi-master <boolean>;
notify ( explicit | master-only | primary-only | <boolean> );
+ notify-cds <boolean>;
notify-defer <integer>;
notify-delay <integer>;
notify-source ( <ipv4_address> | * );
no-case-compress { <address_match_element>; ... };
nocookie-udp-size <integer>;
notify ( explicit | master-only | primary-only | <boolean> );
+ notify-cds <boolean>;
notify-defer <integer>;
notify-delay <integer>;
notify-rate <integer>;
min-transfer-rate-in <integer> <integer>;
multi-master <boolean>;
notify ( explicit | master-only | primary-only | <boolean> );
+ notify-cds <boolean>;
notify-defer <integer>;
notify-delay <integer>;
notify-source ( <ipv4_address> | * );
no-case-compress { <address_match_element>; ... };
nocookie-udp-size <integer>;
notify ( explicit | master-only | primary-only | <boolean> );
+ notify-cds <boolean>;
notify-defer <integer>;
notify-delay <integer>;
notify-source ( <ipv4_address> | * );
max-types-per-name <integer>;
max-zone-ttl ( unlimited | <duration> ); // deprecated
notify ( explicit | master-only | primary-only | <boolean> );
+ notify-cds <boolean>;
notify-defer <integer>;
notify-delay <integer>;
notify-source ( <ipv4_address> | * );
min-transfer-rate-in <integer> <integer>;
multi-master <boolean>;
notify ( explicit | master-only | primary-only | <boolean> );
+ notify-cds <boolean>;
notify-defer <integer>;
notify-delay <integer>;
notify-source ( <ipv4_address> | * );
*/
void
-dns_zone_setnotifytype(dns_zone_t *zone, dns_notifytype_t notifytype);
+dns_zone_setnotifytype(dns_zone_t *zone, dns_rdatatype_t type,
+ dns_notifytype_t notifytype);
/*%<
- * Sets zone notify method to "notifytype"
+ * Sets zone notify(type) method to "notifytype"
*/
void
if (zone->notifysoa.notify_acl != NULL) {
dns_acl_detach(&zone->notifysoa.notify_acl);
}
+ if (zone->notifycds.notify_acl != NULL) {
+ dns_acl_detach(&zone->notifycds.notify_acl);
+ }
if (zone->query_acl != NULL) {
dns_acl_detach(&zone->query_acl);
}
}
void
-dns_zone_setnotifytype(dns_zone_t *zone, dns_notifytype_t notifytype) {
+dns_zone_setnotifytype(dns_zone_t *zone, dns_rdatatype_t type,
+ dns_notifytype_t notifytype) {
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
- zone->notifysoa.notifytype = notifytype;
+ switch (type) {
+ case dns_rdatatype_soa:
+ zone->notifysoa.notifytype = notifytype;
+ break;
+ case dns_rdatatype_cds:
+ INSIST(notifytype == dns_notifytype_no ||
+ notifytype == dns_notifytype_yes);
+ zone->notifycds.notifytype = notifytype;
+ break;
+ default:
+ UNREACHABLE();
+ }
UNLOCK_ZONE(zone);
}
LOCK_ZONE(zone);
zone->notifysoa.notifysrc4 = *notifysrc;
+ zone->notifycds.notifysrc4 = *notifysrc;
UNLOCK_ZONE(zone);
}
LOCK_ZONE(zone);
*notifysrc = zone->notifysoa.notifysrc4;
+ *notifysrc = zone->notifycds.notifysrc4;
UNLOCK_ZONE(zone);
}
LOCK_ZONE(zone);
zone->notifysoa.notifysrc6 = *notifysrc;
+ zone->notifycds.notifysrc6 = *notifysrc;
UNLOCK_ZONE(zone);
}
LOCK_ZONE(zone);
*notifysrc = zone->notifysoa.notifysrc6;
+ *notifysrc = zone->notifycds.notifysrc6;
UNLOCK_ZONE(zone);
}
checkds_cancel(zone);
dns_notify_cancel(&zone->notifysoa);
+ dns_notify_cancel(&zone->notifycds);
forward_cancel(zone);
dns_zone_setnotifyacl(dns_zone_t *zone, dns_acl_t *acl) {
REQUIRE(DNS_ZONE_VALID(zone));
+ dns_zone_clearnotifyacl(zone);
+
LOCK_ZONE(zone);
- if (zone->notifysoa.notify_acl != NULL) {
- dns_acl_detach(&zone->notifysoa.notify_acl);
- }
dns_acl_attach(acl, &zone->notifysoa.notify_acl);
+ dns_acl_attach(acl, &zone->notifycds.notify_acl);
UNLOCK_ZONE(zone);
}
if (zone->notifysoa.notify_acl != NULL) {
dns_acl_detach(&zone->notifysoa.notify_acl);
}
+ if (zone->notifycds.notify_acl != NULL) {
+ dns_acl_detach(&zone->notifycds.notify_acl);
+ }
UNLOCK_ZONE(zone);
}
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR | CFG_ZONE_STUB, NULL },
{ "notify", &cfg_type_notifytype,
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR, NULL },
+ { "notify-cds", &cfg_type_boolean,
+ CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR, NULL },
{ "notify-defer", &cfg_type_uint32,
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR, NULL },
{ "notify-delay", &cfg_type_uint32,