diff --git a/lib/dns/catz.c b/lib/dns/catz.c index ed66de9cfa..d8d26d2d2e 100644 --- a/lib/dns/catz.c +++ b/lib/dns/catz.c @@ -565,7 +565,7 @@ dns__catz_zones_merge(dns_catz_zone_t *catz, dns_catz_zone_t *newcatz) { dns_name_format(&nentry->name, zname, DNS_NAME_FORMATSIZE); - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_DEBUG(3), "catz: iterating over '%s' from catalog '%s'", zname, czname); @@ -599,7 +599,7 @@ dns__catz_zones_merge(dns_catz_zone_t *catz, dns_catz_zone_t *newcatz) { dns_name_format(&parentcatz->name, pczname, DNS_NAME_FORMATSIZE); isc_log_write(DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_MASTER, + DNS_LOGMODULE_CATZ, ISC_LOG_DEBUG(3), "catz: zone '%s' " "change of ownership from " @@ -609,8 +609,7 @@ dns__catz_zones_merge(dns_catz_zone_t *catz, dns_catz_zone_t *newcatz) { parentcatz->catzs->view, parentcatz->catzs->zmm->udata); isc_log_write(DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_MASTER, - ISC_LOG_INFO, + DNS_LOGMODULE_CATZ, ISC_LOG_INFO, "catz: deleting zone '%s' " "from catalog '%s' - %s", zname, pczname, @@ -642,8 +641,7 @@ dns__catz_zones_merge(dns_catz_zone_t *catz, dns_catz_zone_t *newcatz) { * modifications. */ isc_log_write(DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_MASTER, - ISC_LOG_INFO, + DNS_LOGMODULE_CATZ, ISC_LOG_INFO, "catz: zone '%s' unique label " "has changed, reset state", zname); @@ -656,7 +654,7 @@ dns__catz_zones_merge(dns_catz_zone_t *catz, dns_catz_zone_t *newcatz) { if (find_result != ISC_R_SUCCESS) { isc_log_write(DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_MASTER, ISC_LOG_DEBUG(3), + DNS_LOGMODULE_CATZ, ISC_LOG_DEBUG(3), "catz: zone '%s' was expected to exist " "but can not be found, will be restored", zname); @@ -695,7 +693,7 @@ dns__catz_zones_merge(dns_catz_zone_t *catz, dns_catz_zone_t *newcatz) { dns_name_format(&entry->name, zname, DNS_NAME_FORMATSIZE); result = delzone(entry, catz, catz->catzs->view, catz->catzs->zmm->udata); - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_INFO, "catz: deleting zone '%s' from catalog '%s' - %s", zname, czname, isc_result_totext(result)); @@ -716,7 +714,7 @@ dns__catz_zones_merge(dns_catz_zone_t *catz, dns_catz_zone_t *newcatz) { dns_name_format(&entry->name, zname, DNS_NAME_FORMATSIZE); result = addzone(entry, catz, catz->catzs->view, catz->catzs->zmm->udata); - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_INFO, "catz: adding zone '%s' from catalog " "'%s' - %s", @@ -732,7 +730,7 @@ dns__catz_zones_merge(dns_catz_zone_t *catz, dns_catz_zone_t *newcatz) { dns_name_format(&entry->name, zname, DNS_NAME_FORMATSIZE); result = modzone(entry, catz, catz->catzs->view, catz->catzs->zmm->udata); - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_INFO, "catz: modifying zone '%s' from catalog " "'%s' - %s", @@ -862,7 +860,7 @@ dns__catz_timer_start(dns_catz_zone_t *catz) { char dname[DNS_NAME_FORMATSIZE]; dns_name_format(&catz->name, dname, DNS_NAME_FORMATSIZE); - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_INFO, "catz: %s: new zone version came " "too soon, deferring update for " @@ -904,7 +902,7 @@ dns_catz_zone_add(dns_catz_zones_t *catzs, const dns_name_t *name, char zname[DNS_NAME_FORMATSIZE]; dns_name_format(name, zname, DNS_NAME_FORMATSIZE); - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_DEBUG(3), "catz: dns_catz_zone_add %s", zname); LOCK(&catzs->lock); @@ -1193,7 +1191,7 @@ catz_process_coo(dns_catz_zone_t *catz, dns_label_t *mhash, } if (dns_rdataset_count(value) != 1) { - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_WARNING, "catz: 'coo' property PTR RRset contains " "more than one record, which is invalid"); @@ -1252,7 +1250,7 @@ catz_process_zones_entry(dns_catz_zone_t *catz, dns_rdataset_t *value, } if (dns_rdataset_count(value) != 1) { - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_WARNING, "catz: member zone PTR RRset contains " "more than one record, which is invalid"); @@ -1313,7 +1311,7 @@ catz_process_version(dns_catz_zone_t *catz, dns_rdataset_t *value) { } if (dns_rdataset_count(value) != 1) { - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_WARNING, "catz: 'version' property TXT RRset contains " "more than one record, which is invalid"); @@ -1365,7 +1363,7 @@ catz_process_version(dns_catz_zone_t *catz, dns_rdataset_t *value) { cleanup: dns_rdata_freestruct(&rdatatxt); if (result != ISC_R_SUCCESS) { - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_WARNING, "catz: invalid record for the catalog " "zone version property"); @@ -1578,7 +1576,7 @@ catz_process_apl(dns_catz_zone_t *catz, isc_buffer_t **aclbp, } if (dns_rdataset_count(value) > 1) { - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_WARNING, "catz: more than one APL entry for member zone, " "result is undefined"); @@ -1718,7 +1716,7 @@ catz_entry_add_or_mod(dns_catz_zone_t *catz, isc_ht_t *ht, unsigned char *key, isc_result_t result = isc_ht_add(ht, key, (uint32_t)keysize, nentry); if (result != ISC_R_SUCCESS) { - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_ERROR, "catz: error %s zone '%s' from catalog '%s' - %s", msg, zname, czname, isc_result_totext(result)); @@ -1816,7 +1814,7 @@ dns__catz_update_process(dns_catz_zone_t *catz, const dns_name_t *src_name, REQUIRE(ISC_MAGIC_VALID(src_name, DNS_NAME_MAGIC)); if (rdataset->rdclass != dns_rdataclass_in) { - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_ERROR, "catz: RR found which has a non-IN class"); catz->broken = true; @@ -2004,7 +2002,7 @@ dns_catz_generate_zonecfg(dns_catz_zone_t *catz, dns_catz_entry_t *entry, dns_name_format(&entry->name, zname, DNS_NAME_FORMATSIZE); isc_log_write(DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_MASTER, ISC_LOG_ERROR, + DNS_LOGMODULE_CATZ, ISC_LOG_ERROR, "catz: zone '%s' uses an invalid primary " "(no IP address assigned)", zname); @@ -2098,7 +2096,7 @@ dns__catz_timer_cb(void *arg) { dns_name_format(&catz->name, domain, DNS_NAME_FORMATSIZE); if (!catz->active) { - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_INFO, "catz: %s: no longer active, reload is canceled", domain); @@ -2111,8 +2109,8 @@ dns__catz_timer_cb(void *arg) { catz->updbversion = catz->dbversion; catz->dbversion = NULL; - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, - ISC_LOG_INFO, "catz: %s: reload start", domain); + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_INFO, + "catz: %s: reload start", domain); dns_catz_zone_ref(catz); isc_work_enqueue(catz->loop, dns__catz_update_cb, dns__catz_done_cb, @@ -2180,7 +2178,7 @@ dns_catz_dbupdate_callback(dns_db_t *db, void *fn_arg) { catz->updatepending = true; dns_name_format(&catz->name, dname, DNS_NAME_FORMATSIZE); - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_DEBUG(3), "catz: %s: update already queued or running", dname); @@ -2274,7 +2272,7 @@ dns__catz_update_cb(void *data) { UNLOCK(&catzs->lock); if (result != ISC_R_SUCCESS) { /* This can happen if we remove the zone in the meantime. */ - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_ERROR, "catz: zone '%s' not in config", bname); goto exit; @@ -2282,7 +2280,7 @@ dns__catz_update_cb(void *data) { if (!is_active) { /* This can happen during a reconfiguration. */ - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_INFO, "catz: zone '%s' is no longer active", bname); result = ISC_R_CANCELED; @@ -2292,21 +2290,20 @@ dns__catz_update_cb(void *data) { result = dns_db_getsoaserial(updb, oldcatz->updbversion, &vers); if (result != ISC_R_SUCCESS) { /* A zone without SOA record?!? */ - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_ERROR, "catz: zone '%s' has no SOA record (%s)", bname, isc_result_totext(result)); goto exit; } - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, - ISC_LOG_INFO, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_INFO, "catz: updating catalog zone '%s' with serial %" PRIu32, bname, vers); result = dns_db_createiterator(updb, DNS_DB_NONSEC3, &updbit); if (result != ISC_R_SUCCESS) { - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_ERROR, "catz: failed to create DB iterator - %s", isc_result_totext(result)); @@ -2323,7 +2320,7 @@ dns__catz_update_cb(void *data) { result = dns_name_fromstring(name, "version", &updb->origin, 0, NULL); if (result != ISC_R_SUCCESS) { dns_dbiterator_destroy(&updbit); - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_ERROR, "catz: failed to create name from string - %s", isc_result_totext(result)); @@ -2333,7 +2330,7 @@ dns__catz_update_cb(void *data) { result = dns_dbiterator_seek(updbit, name); if (result != ISC_R_SUCCESS) { dns_dbiterator_destroy(&updbit); - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_ERROR, "catz: zone '%s' has no 'version' record (%s) " "and will not be processed", @@ -2356,7 +2353,7 @@ dns__catz_update_cb(void *data) { result = dns_dbiterator_current(updbit, &node, name); if (result != ISC_R_SUCCESS) { isc_log_write(DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_MASTER, ISC_LOG_ERROR, + DNS_LOGMODULE_CATZ, ISC_LOG_ERROR, "catz: failed to get db iterator - %s", isc_result_totext(result)); break; @@ -2379,7 +2376,7 @@ dns__catz_update_cb(void *data) { 0, 0, &rdsiter); if (result != ISC_R_SUCCESS) { isc_log_write(DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_MASTER, ISC_LOG_ERROR, + DNS_LOGMODULE_CATZ, ISC_LOG_ERROR, "catz: failed to fetch rrdatasets - %s", isc_result_totext(result)); dns_db_detachnode(updb, &node); @@ -2423,7 +2420,7 @@ dns__catz_update_cb(void *data) { dns_rdatatype_format(rdataset.type, typebuf, sizeof(typebuf)); isc_log_write(DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_MASTER, + DNS_LOGMODULE_CATZ, ISC_LOG_WARNING, "catz: invalid record in catalog " "zone - %s %s %s (%s) - ignoring", @@ -2448,7 +2445,7 @@ dns__catz_update_cb(void *data) { } dns_dbiterator_destroy(&updbit); - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_DEBUG(3), "catz: update_from_db: iteration finished: %s", isc_result_totext(result)); @@ -2460,12 +2457,12 @@ dns__catz_update_cb(void *data) { ? oldcatz->version : newcatz->version; if (catz_vers == DNS_CATZ_VERSION_UNDEFINED) { - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_WARNING, "catz: zone '%s' version is not set", bname); newcatz->broken = true; } else if (catz_vers != 1 && catz_vers != 2) { - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_WARNING, "catz: zone '%s' unsupported version " "'%" PRIu32 "'", @@ -2477,7 +2474,7 @@ dns__catz_update_cb(void *data) { if (newcatz->broken) { dns_name_format(name, cname, DNS_NAME_FORMATSIZE); - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_ERROR, "catz: new catalog zone '%s' is broken and " "will not be processed", @@ -2493,14 +2490,14 @@ dns__catz_update_cb(void *data) { result = dns__catz_zones_merge(oldcatz, newcatz); dns_catz_zone_detach(&newcatz); if (result != ISC_R_SUCCESS) { - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_ERROR, "catz: failed merging zones: %s", isc_result_totext(result)); goto exit; } - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_DEBUG(3), "catz: update_from_db: new zone merged"); @@ -2530,8 +2527,8 @@ dns__catz_done_cb(void *data) { UNLOCK(&catz->catzs->lock); - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, - ISC_LOG_INFO, "catz: %s: reload done: %s", dname, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_CATZ, ISC_LOG_INFO, + "catz: %s: reload done: %s", dname, isc_result_totext(catz->updateresult)); dns_catz_zone_unref(catz); @@ -2577,7 +2574,7 @@ dns_catz_postreconfig(dns_catz_zones_t *catzs) { dns_name_format(&catz->name, cname, DNS_NAME_FORMATSIZE); isc_log_write(DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_MASTER, ISC_LOG_WARNING, + DNS_LOGMODULE_CATZ, ISC_LOG_WARNING, "catz: removing catalog zone %s", cname); /* diff --git a/lib/dns/rpz.c b/lib/dns/rpz.c index 80ec16b14f..bd736895b9 100644 --- a/lib/dns/rpz.c +++ b/lib/dns/rpz.c @@ -609,7 +609,7 @@ fix_qname_skip_recurse(dns_rpz_zones_t *rpzs) { } set: - isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB, + isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RPZ, DNS_RPZ_DEBUG_QUIET, "computed RPZ qname_skip_recurse mask=0x%" PRIx64, (uint64_t)mask); @@ -721,7 +721,7 @@ badname(int level, const dns_name_t *name, const char *str1, const char *str2) { if (level < DNS_RPZ_DEBUG_QUIET && isc_log_wouldlog(level)) { char namebuf[DNS_NAME_FORMATSIZE]; dns_name_format(name, namebuf, sizeof(namebuf)); - isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB, level, + isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RPZ, level, "invalid rpz IP address \"%s\"%s%s", namebuf, str1, str2); } @@ -1023,7 +1023,7 @@ name2ipkey(int log_level, dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type, { char ip2_str[DNS_NAME_FORMATSIZE]; dns_name_format(ip_name2, ip2_str, sizeof(ip2_str)); - isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB, + isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RPZ, log_level, "rpz IP address \"%s\"" " is not the canonical \"%s\"", @@ -1384,7 +1384,7 @@ add_cidr(dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type, * bin/tests/system/rpz/tests.sh looks for "rpz.*failed". */ dns_name_format(src_name, namebuf, sizeof(namebuf)); - isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB, + isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RPZ, DNS_RPZ_ERROR_LEVEL, "rpz add_cidr(%s) failed: %s", namebuf, isc_result_totext(result)); @@ -1614,7 +1614,7 @@ dns_rpz_dbupdate_callback(dns_db_t *db, void *fn_arg) { rpz->updatepending = true; dns_name_format(&rpz->origin, dname, DNS_NAME_FORMATSIZE); - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_RPZ, ISC_LOG_DEBUG(3), "rpz: %s: update already queued or running", dname); @@ -1660,7 +1660,7 @@ dns__rpz_timer_start(dns_rpz_zone_t *rpz) { char dname[DNS_NAME_FORMATSIZE]; dns_name_format(&rpz->origin, dname, DNS_NAME_FORMATSIZE); - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_RPZ, ISC_LOG_INFO, "rpz: %s: new zone version came " "too soon, deferring update for " @@ -1711,8 +1711,8 @@ update_rpz_done_cb(void *data) { UNLOCK(&rpz->rpzs->maint_lock); - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, - ISC_LOG_INFO, "rpz: %s: reload done: %s", dname, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_RPZ, ISC_LOG_INFO, + "rpz: %s: reload done: %s", dname, isc_result_totext(rpz->updateresult)); dns_rpz_zones_unref(rpz->rpzs); @@ -1732,7 +1732,7 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) { result = dns_db_createiterator(rpz->updb, DNS_DB_NONSEC3, &updbit); if (result != ISC_R_SUCCESS) { - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_RPZ, ISC_LOG_ERROR, "rpz: %s: failed to create DB iterator - %s", domain, isc_result_totext(result)); @@ -1741,7 +1741,7 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) { result = dns_dbiterator_first(updbit); if (result != ISC_R_SUCCESS && result != ISC_R_NOMORE) { - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_RPZ, ISC_LOG_ERROR, "rpz: %s: failed to get db iterator - %s", domain, isc_result_totext(result)); @@ -1761,7 +1761,7 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) { result = dns_dbiterator_current(updbit, &node, name); if (result != ISC_R_SUCCESS) { isc_log_write(DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_MASTER, ISC_LOG_ERROR, + DNS_LOGMODULE_RPZ, ISC_LOG_ERROR, "rpz: %s: failed to get dbiterator - %s", domain, isc_result_totext(result)); goto cleanup; @@ -1774,7 +1774,7 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) { 0, 0, &rdsiter); if (result != ISC_R_SUCCESS) { isc_log_write(DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_MASTER, ISC_LOG_ERROR, + DNS_LOGMODULE_RPZ, ISC_LOG_ERROR, "rpz: %s: failed to fetch " "rrdatasets - %s", domain, isc_result_totext(result)); @@ -1791,7 +1791,7 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) { if (result != ISC_R_NOMORE) { isc_log_write( DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_MASTER, ISC_LOG_ERROR, + DNS_LOGMODULE_RPZ, ISC_LOG_ERROR, "rpz: %s: error %s while creating " "rdatasetiter", domain, isc_result_totext(result)); @@ -1806,7 +1806,7 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) { if (result != ISC_R_SUCCESS) { dns_name_format(name, namebuf, sizeof(namebuf)); isc_log_write(DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_MASTER, ISC_LOG_ERROR, + DNS_LOGMODULE_RPZ, ISC_LOG_ERROR, "rpz: %s, adding node %s to HT error %s", domain, namebuf, isc_result_totext(result)); @@ -1833,7 +1833,7 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) { if (result != ISC_R_SUCCESS) { dns_name_format(name, namebuf, sizeof(namebuf)); isc_log_write(DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_MASTER, ISC_LOG_ERROR, + DNS_LOGMODULE_RPZ, ISC_LOG_ERROR, "rpz: %s: adding node %s " "to RPZ error %s", domain, namebuf, @@ -1841,7 +1841,7 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) { } else if (isc_log_wouldlog(ISC_LOG_DEBUG(3))) { dns_name_format(name, namebuf, sizeof(namebuf)); isc_log_write(DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_MASTER, ISC_LOG_DEBUG(3), + DNS_LOGMODULE_RPZ, ISC_LOG_DEBUG(3), "rpz: %s: adding node %s", domain, namebuf); } @@ -1978,8 +1978,8 @@ dns__rpz_timer_cb(void *arg) { rpz->dbversion = NULL; dns_name_format(&rpz->origin, domain, DNS_NAME_FORMATSIZE); - isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, - ISC_LOG_INFO, "rpz: %s: reload start", domain); + isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_RPZ, ISC_LOG_INFO, + "rpz: %s: reload start", domain); dns_rpz_zones_ref(rpz->rpzs); isc_work_enqueue(rpz->loop, update_rpz_cb, update_rpz_done_cb, rpz); @@ -2323,7 +2323,7 @@ del_name(dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type, * "rpz.*failed". */ dns_name_format(src_name, namebuf, sizeof(namebuf)); - isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB, + isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RPZ, DNS_RPZ_ERROR_LEVEL, "rpz del_name(%s) node delete " "failed: %s", @@ -2488,7 +2488,7 @@ dns_rpz_find_ip(dns_rpz_zones_t *rpzs, dns_rpz_type_t rpz_type, /* * bin/tests/system/rpz/tests.sh looks for "rpz.*failed". */ - isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB, + isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RPZ, DNS_RPZ_ERROR_LEVEL, "rpz ip2name() failed: %s", isc_result_totext(result)); return DNS_RPZ_INVALID_NUM; @@ -2551,7 +2551,7 @@ dns_rpz_find_name(dns_rpz_zones_t *rpzs, dns_rpz_type_t rpz_type, * bin/tests/system/rpz/tests.sh looks for "rpz.*failed". */ dns_name_format(trig_name, namebuf, sizeof(namebuf)); - isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB, + isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RPZ, DNS_RPZ_ERROR_LEVEL, "dns_rpz_find_name(%s) failed: %s", namebuf, isc_result_totext(result)); diff --git a/lib/isc/include/isc/log.h b/lib/isc/include/isc/log.h index 2919e3ae74..3469c4bded 100644 --- a/lib/isc/include/isc/log.h +++ b/lib/isc/include/isc/log.h @@ -179,8 +179,6 @@ enum isc_logmodule { ISC_LOGMODULE_CRYPTO, /* dns modules */ DNS_LOGMODULE_DB, - DNS_LOGMODULE_RBTDB, - DNS_LOGMODULE_RBT, DNS_LOGMODULE_RDATA, DNS_LOGMODULE_MASTER, DNS_LOGMODULE_MESSAGE, @@ -212,6 +210,8 @@ enum isc_logmodule { DNS_LOGMODULE_DNSTAP, DNS_LOGMODULE_SSU, DNS_LOGMODULE_QP, + DNS_LOGMODULE_RPZ, + DNS_LOGMODULE_CATZ, /* ns modules */ NS_LOGMODULE_CLIENT, NS_LOGMODULE_QUERY, diff --git a/lib/isc/log.c b/lib/isc/log.c index 37b64bdcd4..79dbe3cf6d 100644 --- a/lib/isc/log.c +++ b/lib/isc/log.c @@ -224,8 +224,6 @@ static const char *modules_description[] = { [ISC_LOGMODULE_CRYPTO] = "crypto", /* dns modules */ [DNS_LOGMODULE_DB] = "dns/db", - [DNS_LOGMODULE_RBTDB] = "dns/rbtdb", - [DNS_LOGMODULE_RBT] = "dns/rbt", [DNS_LOGMODULE_RDATA] = "dns/rdata", [DNS_LOGMODULE_MASTER] = "dns/master", [DNS_LOGMODULE_MESSAGE] = "dns/message", @@ -257,6 +255,8 @@ static const char *modules_description[] = { [DNS_LOGMODULE_DNSTAP] = "dns/dnstap", [DNS_LOGMODULE_SSU] = "dns/ssu", [DNS_LOGMODULE_QP] = "dns/qp", + [DNS_LOGMODULE_RPZ] = "dns/rpz", + [DNS_LOGMODULE_CATZ] = "dns/catz", /* ns modules */ [NS_LOGMODULE_CLIENT] = "ns/client", [NS_LOGMODULE_QUERY] = "ns/query",