dns_adbfind_t *find;
dns_request_t *request;
dns_name_t ns;
+ dns_rdatatype_t type;
in_port_t port;
isc_sockaddr_t src;
isc_sockaddr_t dst;
*/
void
-dns_notify_create(isc_mem_t *mctx, in_port_t port, unsigned int flags,
- dns_notify_t **notifyp);
+dns_notify_create(isc_mem_t *mctx, dns_rdatatype_t type, in_port_t port,
+ unsigned int flags, dns_notify_t **notifyp);
/*%<
* Create a notify structure to maintain state.
*
*/
bool
-dns_notify_isqueued(dns_notifyctx_t *nctx, in_port_t port, unsigned int flags,
- dns_name_t *name, isc_sockaddr_t *addr, dns_tsigkey_t *key,
- dns_transport_t *transport);
+dns_notify_isqueued(dns_notifyctx_t *nctx, dns_rdatatype_t type, in_port_t port,
+ unsigned int flags, dns_name_t *name, isc_sockaddr_t *addr,
+ dns_tsigkey_t *key, dns_transport_t *transport);
/*%<
- * Check if we already have a notify queued matching name, destination
- * address and port, TSIG key, and transport. Will requeue on the normal
- * notify ratelimiter if the notify was enqueued on the startup ratelimiter
- * and this is not a startup notify.
+ * Check if we already have a notify queued matching name, type,
+ * destination address and port, TSIG key, and transport. Will
+ * requeue on the normal notify ratelimiter if the notify was
+ * enqueued on the startup ratelimiter and this is not a startup
+ * notify.
*
* Requires:
* 'nctx' is not NULL
}
void
-dns_notify_create(isc_mem_t *mctx, in_port_t port, unsigned int flags,
- dns_notify_t **notifyp) {
+dns_notify_create(isc_mem_t *mctx, dns_rdatatype_t type, in_port_t port,
+ unsigned int flags, dns_notify_t **notifyp) {
dns_notify_t *notify;
REQUIRE(notifyp != NULL && *notifyp == NULL);
*notify = (dns_notify_t){
.flags = flags,
.port = port,
+ .type = type,
};
isc_mem_attach(mctx, ¬ify->mctx);
}
bool
-dns_notify_isqueued(dns_notifyctx_t *nctx, in_port_t port, unsigned int flags,
- dns_name_t *name, isc_sockaddr_t *addr, dns_tsigkey_t *key,
- dns_transport_t *transport) {
+dns_notify_isqueued(dns_notifyctx_t *nctx, dns_rdatatype_t type, in_port_t port,
+ unsigned int flags, dns_name_t *name, isc_sockaddr_t *addr,
+ dns_tsigkey_t *key, dns_transport_t *transport) {
dns_notify_t *notify = NULL;
isc_result_t result;
if (n->request != NULL) {
continue;
}
+ if (n->type != type) {
+ continue;
+ }
if ((name != NULL && dns_name_dynamic(&n->ns) &&
dns_name_equal(name, &n->ns)) ||
(addr != NULL && isc_sockaddr_equal(addr, &n->dst) &&
ISC_LIST_FOREACH(notify->find->list, ai, publink) {
dst = ai->sockaddr;
- if (dns_notify_isqueued(notifyctx, notify->port, notify->flags,
- NULL, &dst, NULL, NULL))
+ if (dns_notify_isqueued(notifyctx, notify->type, notify->port,
+ notify->flags, NULL, &dst, NULL, NULL))
{
continue;
}
}
newnotify = NULL;
flags = notify->flags & DNS_NOTIFY_NOSOA;
- dns_notify_create(notify->mctx, notify->port, flags,
- &newnotify);
+ dns_notify_create(notify->mctx, notify->type, notify->port,
+ flags, &newnotify);
dns__zone_iattach_locked(notify->zone, &newnotify->zone);
ISC_LIST_APPEND(notifyctx->notifies, newnotify, link);
newnotify->dst = dst;
goto next;
}
- if (dns_notify_isqueued(&zone->notifysoa, zone->view->dstport,
- flags, NULL, &dst, key, transport))
+ if (dns_notify_isqueued(&zone->notifysoa, dns_rdatatype_soa,
+ zone->view->dstport, flags, NULL, &dst,
+ key, transport))
{
if (key != NULL) {
dns_tsigkey_detach(&key);
goto next;
}
- dns_notify_create(zone->mctx, zone->view->dstport, flags,
- ¬ify);
+ dns_notify_create(zone->mctx, dns_rdatatype_soa,
+ zone->view->dstport, flags, ¬ify);
zone_iattach(zone, ¬ify->zone);
notify->src = src;
notify->dst = dst;
}
LOCK_ZONE(zone);
- isqueued = dns_notify_isqueued(&zone->notifysoa,
- zone->view->dstport, flags,
- &ns.name, NULL, NULL, NULL);
+ isqueued = dns_notify_isqueued(
+ &zone->notifysoa, dns_rdatatype_soa,
+ zone->view->dstport, flags, &ns.name, NULL, NULL, NULL);
UNLOCK_ZONE(zone);
if (isqueued) {
continue;
}
- dns_notify_create(zone->mctx, zone->view->dstport, flags,
- ¬ify);
+ dns_notify_create(zone->mctx, dns_rdatatype_soa,
+ zone->view->dstport, flags, ¬ify);
dns_zone_iattach(zone, ¬ify->zone);
dns_name_dup(&ns.name, zone->mctx, ¬ify->ns);
LOCK_ZONE(zone);