add log-report-channel zone option

add a boolean "log-report-channel" option for primary and
secondary zones, which sets the DNS_ZONEOPT_LOGREPORTS zone
flag. this option is not yet functional.
This commit is contained in:
Evan Hunt
2024-10-19 13:26:38 -07:00
parent c676fd2566
commit 5519dd2669
7 changed files with 20 additions and 3 deletions

View File

@@ -1493,6 +1493,13 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
} else {
dns_zone_setrad(zone, NULL);
}
obj = NULL;
result = cfg_map_get(zoptions, "log-report-channel", &obj);
if (result == ISC_R_SUCCESS) {
dns_zone_setoption(zone, DNS_ZONEOPT_LOGREPORTS,
cfg_obj_asboolean(obj));
}
} else if (ztype == dns_zone_redirect) {
dns_zone_setnotifytype(zone, dns_notifytype_no);

View File

@@ -105,6 +105,11 @@ view "first" {
file "yyy";
max-ixfr-ratio unlimited;
};
zone "reports" {
type primary;
file "reports";
log-report-channel yes;
};
dnssec-validation auto;
max-query-restarts 15;
zone-statistics terse;

View File

@@ -1,5 +1,6 @@
example1 IN first primary
clone IN first primary
reports IN first primary
example1 IN second primary
example2 IN second static-stub
example3 IN second static-stub

View File

@@ -31,6 +31,7 @@ zone <string> [ <class> ] {
ixfr-from-differences <boolean>;
journal <quoted_string>;
key-directory <quoted_string>;
log-report-channel <boolean>;
masterfile-format ( raw | text );
masterfile-style ( full | relative );
max-ixfr-ratio ( unlimited | <percentage> );

View File

@@ -22,6 +22,7 @@ zone <string> [ <class> ] {
ixfr-from-differences <boolean>;
journal <quoted_string>;
key-directory <quoted_string>;
log-report-channel <boolean>;
masterfile-format ( raw | text );
masterfile-style ( full | relative );
max-ixfr-ratio ( unlimited | <percentage> );

View File

@@ -94,9 +94,9 @@ typedef enum {
*/
DNS_ZONEOPT_NOTIFYTOSOA = 1 << 21, /*%< Notify the SOA MNAME */
DNS_ZONEOPT_NSEC3TESTZONE = 1 << 22, /*%< nsec3-test-zone */
/* DNS_ZONEOPT_SECURETOINSECURE = 1 << 23, */
DNS_ZONEOPT_DNSKEYKSKONLY = 1 << 24, /*%< dnssec-dnskey-kskonly */
DNS_ZONEOPT_CHECKDUPRR = 1 << 25, /*%< check-dup-records */
DNS_ZONEOPT_LOGREPORTS = 1 << 23, /* Log error-reporting queries */
DNS_ZONEOPT_DNSKEYKSKONLY = 1 << 24, /*%< dnssec-dnskey-kskonly */
DNS_ZONEOPT_CHECKDUPRR = 1 << 25, /*%< check-dup-records */
DNS_ZONEOPT_CHECKDUPRRFAIL = 1 << 26, /*%< fatal check-dup-records
* failures */
DNS_ZONEOPT_CHECKSPF = 1 << 27, /*%< check SPF records */

View File

@@ -2438,6 +2438,8 @@ static cfg_clausedef_t zone_only_clauses[] = {
{ "ixfr-tmp-file", NULL, CFG_CLAUSEFLAG_ANCIENT },
{ "journal", &cfg_type_qstring,
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "log-report-channel", &cfg_type_boolean,
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "masters", &cfg_type_namesockaddrkeylist,
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR | CFG_ZONE_STUB |
CFG_ZONE_REDIRECT | CFG_CLAUSEFLAG_NODOC },