Lines Matching +defs:d +defs:notify
105 #define DNS_NOTIFY_VALID(notify) ISC_MAGIC_VALID(notify, NOTIFY_MAGIC)
345 dns_remote_t notify;
527 #define zonediff_init(z, d) \
530 (_z)->diff = (d); \
577 DNS_ZONEFLG_NEEDNOTIFY = 0x00000400U, /*%< need to send out notify
607 * notify due to the zone
689 * Hold notify state.
985 notify_find_address(dns_notify_t *notify);
987 notify_send(dns_notify_t *notify);
1226 zone->notify = r;
4306 "%d key(s) revoked, %d still pending", revoked,
4974 ISC_LOG_ERROR, "has %d SOA records",
5154 UNEXPECTED_ERROR("unexpected zone type %d", zone->type);
5253 "in %d seconds",
5992 if (dns_remote_equal(&zone->notify, &remote)) {
5996 dns_remote_clear(&zone->notify);
5999 * If count == 0, don't allocate any space for servers to notify.
6006 * Now set up the notify address and key lists.
6008 dns_remote_init(&zone->notify, count, addresses, sources, keynames,
6305 "key file for %s/%s/%d", namebuf,
6751 "Key %s/%s/%d "
10380 "'%s' using DS %d/%d: %s",
10473 "Pending key %d for zone %s "
10485 "Active key %d for zone %s "
10494 "Revoked key %d for zone %s no longer "
10595 "Pending key %d for "
10619 "Trusted key %d for "
10627 "Revoked key %d for "
10635 "Active key %d for zone "
10657 "Revoked key %d for "
10671 "Key %d for zone %s "
10687 "Pending key %d "
10713 "DNSKEY ID %d is now trusted, "
10720 "New key %d observed "
11121 bool load_pending, exiting, dumping, viewok = false, notify;
11205 notify = (zone->type == dns_zone_secondary ||
11212 if (notify) {
11257 notify = (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDNOTIFY) ||
11261 if (notify) {
11653 zone_debuglog(zone, __func__, 1, "target journal size %d",
12088 dns_notify_t *notify;
12096 for (notify = ISC_LIST_HEAD(zone->notifies); notify != NULL;
12097 notify = ISC_LIST_NEXT(notify, link))
12099 if (notify->find != NULL) {
12100 dns_adb_cancelfind(notify->find);
12102 if (notify->request != NULL) {
12103 dns_request_cancel(notify->request);
12247 dns_notify_t *notify;
12251 for (notify = ISC_LIST_HEAD(zone->notifies); notify != NULL;
12252 notify = ISC_LIST_NEXT(notify, link))
12254 if (notify->request != NULL) {
12257 if (name != NULL && dns_name_dynamic(¬ify->ns) &&
12258 dns_name_equal(name, ¬ify->ns))
12262 if (addr != NULL && isc_sockaddr_equal(addr, ¬ify->dst) &&
12263 notify->key == key && notify->transport == transport)
12273 * not a startup notify, re-enqueue on the normal notify
12276 if (notify->rlevent != NULL && (flags & DNS_NOTIFY_STARTUP) == 0 &&
12277 (notify->flags & DNS_NOTIFY_STARTUP) != 0)
12279 zmgr = notify->zone->zmgr;
12281 ¬ify->rlevent);
12286 notify->flags &= ~DNS_NOTIFY_STARTUP;
12288 notify->zone->zmgr->notifyrl, notify->zone->loop,
12289 notify_send_toaddr, notify, ¬ify->rlevent);
12346 notify_destroy(dns_notify_t *notify, bool locked) {
12349 REQUIRE(DNS_NOTIFY_VALID(notify));
12351 if (notify->zone != NULL) {
12353 LOCK_ZONE(notify->zone);
12355 REQUIRE(LOCKED_ZONE(notify->zone));
12356 if (ISC_LINK_LINKED(notify, link)) {
12357 ISC_LIST_UNLINK(notify->zone->notifies, notify, link);
12360 UNLOCK_ZONE(notify->zone);
12363 zone_idetach(¬ify->zone);
12365 dns_zone_idetach(¬ify->zone);
12368 if (notify->find != NULL) {
12369 dns_adb_destroyfind(¬ify->find);
12371 if (notify->request != NULL) {
12372 dns_request_destroy(¬ify->request);
12374 if (dns_name_dynamic(¬ify->ns)) {
12375 dns_name_free(¬ify->ns, notify->mctx);
12377 if (notify->key != NULL) {
12378 dns_tsigkey_detach(¬ify->key);
12380 if (notify->transport != NULL) {
12381 dns_transport_detach(¬ify->transport);
12383 mctx = notify->mctx;
12384 isc_mem_put(notify->mctx, notify, sizeof(*notify));
12390 dns_notify_t *notify;
12394 notify = isc_mem_get(mctx, sizeof(*notify));
12395 *notify = (dns_notify_t){
12399 isc_mem_attach(mctx, ¬ify->mctx);
12400 isc_sockaddr_any(¬ify->src);
12401 isc_sockaddr_any(¬ify->dst);
12402 dns_name_init(¬ify->ns, NULL);
12403 ISC_LINK_INIT(notify, link);
12404 notify->magic = NOTIFY_MAGIC;
12405 *notifyp = notify;
12415 dns_notify_t *notify = (dns_notify_t *)find->cbarg;
12418 REQUIRE(DNS_NOTIFY_VALID(notify));
12419 REQUIRE(find == notify->find);
12423 dns_adb_destroyfind(¬ify->find);
12424 notify_find_address(notify);
12428 LOCK_ZONE(notify->zone);
12429 notify_send(notify);
12430 UNLOCK_ZONE(notify->zone);
12437 notify_destroy(notify, false);
12441 notify_find_address(dns_notify_t *notify) {
12446 REQUIRE(DNS_NOTIFY_VALID(notify));
12456 dns_view_getadb(notify->zone->view, &adb);
12462 adb, notify->zone->loop, process_notify_adb_event, notify,
12463 ¬ify->ns, dns_rootname, 0, options, 0, NULL,
12464 notify->zone->view->dstport, 0, NULL, ¬ify->find);
12473 if ((notify->find->options & DNS_ADBFIND_WANTEVENT) != 0) {
12478 LOCK_ZONE(notify->zone);
12479 notify_send(notify);
12480 UNLOCK_ZONE(notify->zone);
12483 notify_destroy(notify, false);
12487 notify_send_queue(dns_notify_t *notify, bool startup) {
12489 startup ? notify->zone->zmgr->startupnotifyrl
12490 : notify->zone->zmgr->notifyrl,
12491 notify->zone->loop, notify_send_toaddr, notify,
12492 ¬ify->rlevent);
12497 dns_notify_t *notify = (dns_notify_t *)arg;
12508 REQUIRE(DNS_NOTIFY_VALID(notify));
12510 LOCK_ZONE(notify->zone);
12512 isc_sockaddr_format(¬ify->dst, addrbuf, sizeof(addrbuf));
12514 if (DNS_ZONE_FLAG(notify->zone, DNS_ZONEFLG_LOADED) == 0 ||
12515 notify->rlevent->canceled ||
12516 DNS_ZONE_FLAG(notify->zone, DNS_ZONEFLG_EXITING) ||
12517 notify->zone->view->requestmgr == NULL || notify->zone->db == NULL)
12527 if (isc_sockaddr_pf(¬ify->dst) == PF_INET6 &&
12528 IN6_IS_ADDR_V4MAPPED(¬ify->dst.type.sin6.sin6_addr))
12530 notify_log(notify->zone, ISC_LOG_DEBUG(3),
12531 "notify: ignoring IPv6 mapped IPV4 address: %s",
12537 result = notify_createmessage(notify->zone, notify->flags, &message);
12542 if (notify->key != NULL) {
12544 key = notify->key;
12545 notify->key = NULL;
12547 isc_netaddr_fromsockaddr(&dstip, ¬ify->dst);
12548 result = dns_view_getpeertsig(notify->zone->view, &dstip, &key);
12550 notify_log(notify->zone, ISC_LOG_ERROR,
12562 notify_log(notify->zone, ISC_LOG_INFO,
12563 "sending notify to %s : TSIG (%s)", addrbuf,
12566 notify_log(notify->zone, ISC_LOG_INFO, "sending notify to %s",
12570 if (notify->zone->view->peers != NULL) {
12573 result = dns_peerlist_peerbyaddr(notify->zone->view->peers,
12586 switch (isc_sockaddr_pf(¬ify->dst)) {
12592 src = notify->src;
12594 src = notify->zone->notifysrc4;
12603 src = notify->src;
12605 src = notify->zone->notifysrc6;
12614 if (DNS_ZONE_FLAG(notify->zone, DNS_ZONEFLG_DIALNOTIFY)) {
12619 if ((notify->flags & DNS_NOTIFY_TCP) != 0) {
12625 zmgr_tlsctx_attach(notify->zone->zmgr, &zmgr_tlsctx_cache);
12627 result = dns_request_create(notify->zone->view->requestmgr, message,
12628 &src, ¬ify->dst, notify->transport,
12630 udptimeout, 2, notify->zone->loop,
12631 notify_done, notify, ¬ify->request);
12636 if (isc_sockaddr_pf(¬ify->dst) == AF_INET) {
12637 inc_stats(notify->zone,
12640 inc_stats(notify->zone,
12645 } else if ((notify->flags & DNS_NOTIFY_TCP) == 0) {
12646 notify_log(notify->zone, ISC_LOG_NOTICE,
12647 "notify to %s failed: %s: retrying over TCP",
12649 notify->flags |= DNS_NOTIFY_TCP;
12660 UNLOCK_ZONE(notify->zone);
12661 if (notify->rlevent != NULL) {
12662 isc_rlevent_free(¬ify->rlevent);
12666 isc_sockaddr_format(¬ify->dst, addrbuf, sizeof(addrbuf));
12667 notify_log(notify->zone, ISC_LOG_WARNING,
12668 "notify to %s failed: %s", addrbuf,
12670 notify_destroy(notify, false);
12675 notify_send(dns_notify_t *notify) {
12686 REQUIRE(DNS_NOTIFY_VALID(notify));
12687 REQUIRE(LOCKED_ZONE(notify->zone));
12689 if (DNS_ZONE_FLAG(notify->zone, DNS_ZONEFLG_EXITING)) {
12693 for (ai = ISC_LIST_HEAD(notify->find->list); ai != NULL;
12697 if (notify_isqueued(notify->zone, notify->flags, NULL, &dst,
12702 if (notify_isself(notify->zone, &dst)) {
12706 flags = notify->flags & DNS_NOTIFY_NOSOA;
12707 result = notify_create(notify->mctx, flags, &newnotify);
12711 zone_iattach(notify->zone, &newnotify->zone);
12717 startup = ((notify->flags & DNS_NOTIFY_STARTUP) != 0);
12804 * Record that this was a notify due to starting up.
12851 * Enqueue notify requests for 'also-notify' servers.
12855 dns_remote_reset(&zone->notify, false);
12856 while (!dns_remote_done(&zone->notify)) {
12859 dns_notify_t *notify = NULL;
12862 if (dns_remote_keyname(&zone->notify) != NULL) {
12863 dns_name_t *keyname = dns_remote_keyname(&zone->notify);
12867 if (dns_remote_tlsname(&zone->notify) != NULL) {
12868 dns_name_t *tlsname = dns_remote_tlsname(&zone->notify);
12875 "got TLS configuration for a notify");
12888 /* TODO: glue the transport to the notify */
12890 dst = dns_remote_curraddr(&zone->notify);
12891 src = dns_remote_sourceaddr(&zone->notify);
12908 result = notify_create(zone->mctx, flags, ¬ify);
12919 zone_iattach(zone, ¬ify->zone);
12920 notify->src = src;
12921 notify->dst = dst;
12923 INSIST(notify->key == NULL);
12926 notify->key = key;
12930 INSIST(notify->transport == NULL);
12932 notify->transport = transport;
12936 ISC_LIST_APPEND(zone->notifies, notify, link);
12937 result = notify_send_queue(notify, startup);
12939 notify_destroy(notify, true);
12948 dns_remote_next(&zone->notify, false);
12969 dns_notify_t *notify = NULL;
12976 * Don't notify the primary server unless explicitly
13000 result = notify_create(zone->mctx, flags, ¬ify);
13004 dns_zone_iattach(zone, ¬ify->zone);
13005 dns_name_dup(&ns.name, zone->mctx, ¬ify->ns);
13007 ISC_LIST_APPEND(zone->notifies, notify, link);
13009 notify_find_address(notify);
14154 "refresh: answer SOA count (%d) != 1 "
14398 "soa_query: remote server current address index %d count %d",
15384 * Check that 'from' is a valid notify source, (zone->primaries).
15387 * If the notify message contains a serial number check it
15466 * Accept notify requests from non primaries if they are on
15477 /* Accept notify. */
15481 "refused notify from non-primary: %s", fromtext);
15489 * check if we are a dialup zone as we use the notify request
15523 "notify from %s: "
15534 * let it complete. Record where we got the notify from so we
15544 "notify from %s: "
15551 "notify from %s: "
15560 "notify from %s: serial %u", fromtext, serial);
15563 "notify from %s: no serial", fromtext);
16163 dns_notify_t *notify = dns_request_getarg(request);
16170 REQUIRE(DNS_NOTIFY_VALID(notify));
16173 isc_sockaddr_format(¬ify->dst, addrbuf, sizeof(addrbuf));
16174 dns_message_create(notify->zone->mctx, NULL, NULL,
16190 notify_log(notify->zone, ISC_LOG_DEBUG(3),
16191 "notify response from %s: %.*s", addrbuf,
16199 notify_log(notify->zone, ISC_LOG_DEBUG(1),
16200 "notify to %s successful", addrbuf);
16202 /* just destroy the notify */
16203 } else if ((notify->flags & DNS_NOTIFY_TCP) == 0) {
16204 notify_log(notify->zone, ISC_LOG_NOTICE,
16205 "notify to %s failed: %s: retrying over TCP",
16207 notify->flags |= DNS_NOTIFY_TCP;
16208 dns_request_destroy(¬ify->request);
16209 notify_send_queue(notify, (notify->flags & DNS_NOTIFY_STARTUP));
16212 notify_log(notify->zone, ISC_LOG_WARNING,
16213 "notify to %s failed: %s: retries exceeded", addrbuf,
16216 notify_log(notify->zone, ISC_LOG_WARNING,
16217 "notify to %s failed: %s", addrbuf,
16220 notify_destroy(notify, false);
16342 "dns_ds_buildrdata(keytag=%d, algo=%d, "
16343 "digest=%d) failed: %s",
17596 dns_zone_log(zone, ISC_LOG_ERROR, "has %d SOA records",
17857 "has %d SOA records",
19399 * Find any configured information about the server we'd
19840 zone_debuglog(zone, __func__, 3, "notify = %d, refresh = %d",
20039 * The NEEDREFRESH flag is set only when a notify was received
21608 "%d is queued",
21621 "parent %d",
21628 "parent %d failed",
21656 "parent %d failed",
22929 "zone_rekey done: key %d/%s",