]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
add log-report-channel zone option
authorEvan Hunt <each@isc.org>
Sat, 19 Oct 2024 20:26:38 +0000 (13:26 -0700)
committerEvan Hunt <each@isc.org>
Wed, 23 Oct 2024 21:29:32 +0000 (21:29 +0000)
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.

bin/named/zoneconf.c
bin/tests/system/checkconf/good.conf.in
bin/tests/system/checkconf/good.zonelist
doc/misc/primary.zoneopt
doc/misc/secondary.zoneopt
lib/dns/include/dns/zone.h
lib/isccfg/namedconf.c

index 3c4f43e6a6b22b4ccf23e5f040efa0957f5dc916..6b21fca1c1b8335a8c5d52f1e9e5b1368c04a03a 100644 (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);
 
index bee15b710ab03550bd39fffde83c55830a0f8f76..be3b462b5eb9ce8da6c952d36bcc0106e573dec0 100644 (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;
index a5fbfdae18394872a0b5aa2c752925d1460a079c..f53696d8eb442c70615318a0aea0e18622ec3aad 100644 (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
index 2a37f2b92674e46f3766ef2ab91908aa06c285f3..9993bfed730f084bc23dd257e5131ddcc63c9f57 100644 (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> );
index a08fe56835ed39ad02f03a8127739dc1258cd833..3fef812cb7a0d280d0054940e0b8ce55673f4c06 100644 (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> );
index cded4750bd72c8be96faca8c318f2195ed24ac53..8165c5a67f00cfaaffee74fa6a6311882e4f1636 100644 (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 */
index 791b47e27ea09740433227945e222a5c38ff3c48..2403449ee55abdd4b953c0ee56bf84cde18e4fc3 100644 (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 },