uint32_t fetchcount[ZONEFETCHTYPE_COUNT];
dns_remote_t alsonotify;
- dns_notifyctx_t notifyctx;
+ dns_notifyctx_t notifysoa;
+ dns_notifyctx_t notifycds;
isc_sockaddr_t parentalsrc4;
isc_sockaddr_t parentalsrc6;
dns_remote_t r = {
.magic = DNS_REMOTE_MAGIC,
};
- dns_notifyctx_t nc = {
- .notifytype = dns_notifytype_yes,
- .notifies = ISC_LIST_INITIALIZER,
- };
- isc_sockaddr_any(&nc.notifysrc4);
- isc_sockaddr_any6(&nc.notifysrc6);
- zone->notifyctx = nc;
isc_mem_attach(mctx, &zone->mctx);
isc_mutex_init(&zone->lock);
zone->defaultkasp = NULL;
ISC_LIST_INIT(zone->keyring);
+ dns_notifyctx_init(&zone->notifysoa, dns_rdatatype_soa);
+ dns_notifyctx_init(&zone->notifycds, dns_rdatatype_cds);
+
isc_stats_create(mctx, &zone->gluecachestats,
dns_gluecachestatscounter_max);
if (zone->forward_acl != NULL) {
dns_acl_detach(&zone->forward_acl);
}
- if (zone->notifyctx.notify_acl != NULL) {
- dns_acl_detach(&zone->notifyctx.notify_acl);
+ if (zone->notifysoa.notify_acl != NULL) {
+ dns_acl_detach(&zone->notifysoa.notify_acl);
}
if (zone->query_acl != NULL) {
dns_acl_detach(&zone->query_acl);
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
- zone->notifyctx.notifytype = notifytype;
+ zone->notifysoa.notifytype = notifytype;
UNLOCK_ZONE(zone);
}
REQUIRE(notifysrc != NULL);
LOCK_ZONE(zone);
- zone->notifyctx.notifysrc4 = *notifysrc;
+ zone->notifysoa.notifysrc4 = *notifysrc;
UNLOCK_ZONE(zone);
}
REQUIRE(notifysrc != NULL);
LOCK_ZONE(zone);
- *notifysrc = zone->notifyctx.notifysrc4;
+ *notifysrc = zone->notifysoa.notifysrc4;
UNLOCK_ZONE(zone);
}
REQUIRE(notifysrc != NULL);
LOCK_ZONE(zone);
- zone->notifyctx.notifysrc6 = *notifysrc;
+ zone->notifysoa.notifysrc6 = *notifysrc;
UNLOCK_ZONE(zone);
}
REQUIRE(notifysrc != NULL);
LOCK_ZONE(zone);
- *notifysrc = zone->notifyctx.notifysrc6;
+ *notifysrc = zone->notifysoa.notifysrc6;
UNLOCK_ZONE(zone);
}
DNS_ZONEFLG_NEEDSTARTUPNOTIFY |
DNS_ZONEFLG_NOTIFYNODEFER |
DNS_ZONEFLG_NOTIFYDEFERRED);
- notifytype = zone->notifyctx.notifytype;
+ notifytype = zone->notifysoa.notifytype;
DNS_ZONE_TIME_ADD(now, zone->notifydelay, &zone->notifytime);
UNLOCK_ZONE(zone);
goto next;
}
- if (dns_notify_isqueued(&zone->notifyctx, flags, NULL, &dst,
+ if (dns_notify_isqueued(&zone->notifysoa, flags, NULL, &dst,
key, transport))
{
if (key != NULL) {
transport = NULL;
}
- ISC_LIST_APPEND(zone->notifyctx.notifies, notify, link);
+ ISC_LIST_APPEND(zone->notifysoa.notifies, notify, link);
result = dns_notify_queue(notify, startup);
if (result != ISC_R_SUCCESS) {
dns_notify_destroy(notify, true);
}
LOCK_ZONE(zone);
- isqueued = dns_notify_isqueued(&zone->notifyctx, flags,
+ isqueued = dns_notify_isqueued(&zone->notifysoa, flags,
&ns.name, NULL, NULL, NULL);
UNLOCK_ZONE(zone);
if (isqueued) {
dns_zone_iattach(zone, ¬ify->zone);
dns_name_dup(&ns.name, zone->mctx, ¬ify->ns);
LOCK_ZONE(zone);
- ISC_LIST_APPEND(zone->notifyctx.notifies, notify, link);
+ ISC_LIST_APPEND(zone->notifysoa.notifies, notify, link);
UNLOCK_ZONE(zone);
dns_notify_find_address(notify);
}
checkds_cancel(zone);
- dns_notify_cancel(&zone->notifyctx);
+ dns_notify_cancel(&zone->notifysoa);
forward_cancel(zone);
/*
* Accept notify requests from non primaries if they are on
- * 'zone->notifyctx.notify_acl'.
+ * 'zone->notifysoa.notify_acl'.
*/
tsigkey = dns_message_gettsigkey(msg);
tsig = dns_tsigkey_identity(tsigkey);
if (i >= dns_remote_count(&zone->primaries) &&
- zone->notifyctx.notify_acl != NULL &&
- (dns_acl_match(&netaddr, tsig, zone->notifyctx.notify_acl,
+ zone->notifysoa.notify_acl != NULL &&
+ (dns_acl_match(&netaddr, tsig, zone->notifysoa.notify_acl,
zone->view->aclenv, &match,
NULL) == ISC_R_SUCCESS) &&
match > 0)
*/
if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_REFRESH)) {
DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NEEDREFRESH);
- zone->notifyctx.notifyfrom = *from;
+ zone->notifysoa.notifyfrom = *from;
UNLOCK_ZONE(zone);
if (have_serial) {
dns_zone_logc(zone, DNS_LOGCATEGORY_XFER_IN,
dns_zone_logc(zone, DNS_LOGCATEGORY_XFER_IN, ISC_LOG_INFO,
"notify from %s: no serial", fromtext);
}
- zone->notifyctx.notifyfrom = *from;
+ zone->notifysoa.notifyfrom = *from;
UNLOCK_ZONE(zone);
if (to != NULL) {
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
- if (zone->notifyctx.notify_acl != NULL) {
- dns_acl_detach(&zone->notifyctx.notify_acl);
+ if (zone->notifysoa.notify_acl != NULL) {
+ dns_acl_detach(&zone->notifysoa.notify_acl);
}
- dns_acl_attach(acl, &zone->notifyctx.notify_acl);
+ dns_acl_attach(acl, &zone->notifysoa.notify_acl);
UNLOCK_ZONE(zone);
}
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
- if (zone->notifyctx.notify_acl != NULL) {
- dns_acl_detach(&zone->notifyctx.notify_acl);
+ if (zone->notifysoa.notify_acl != NULL) {
+ dns_acl_detach(&zone->notifysoa.notify_acl);
}
UNLOCK_ZONE(zone);
}
dns__zone_getnotifyctx(dns_zone_t *zone) {
REQUIRE(DNS_ZONE_VALID(zone));
- return &zone->notifyctx;
+ return &zone->notifysoa;
}
void